Author |
|
Beachcomber Newbie
Joined: 20 August 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
Posted: 20 August 2008 at 3:50am | IP Logged
|
|
|
I am evaluating the IMAP component, which is going well, but one problem is with attached .eml files. If I send an email with an .eml attachment that has a perfectly ordinary name, then look at the filename that the IMAP component gives, it has renamed the .eml - and each time I look the name changes (possibly toggles between two names).
code:
MailMessage msg = MBimap.DownloadEntireMessage(env.MessageNumber, false);
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml;
string sFileNameList = "";
if (msg.Attachments.Count > 0)
{
string sSep = "";
for (int i = 0; i < msg.Attachments.Count; i++)
{
Attachment attach = msg.Attachments;
sFileNameList += sSep + msg.Attachments.Filename;
sSep = ", ";
}
I have looked at the msg.Attachements properties, but none give the actual name of the .eml
For instance,
Tesco_-_Livingstone_2008-06_02 14 00 19_1.eml
becomes
8fdb83f0eab67c6c0c06.eml
Is there any way of getting the actual file name?
Thanks
Steve
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 August 2008 at 4:30am | IP Logged
|
|
|
Attachment.Filename property value is not always equivalent to real name of an attached file (as it appears in the e-mail message), because it depends on headers supplied for attachment in .eml file. Perhaps, you should try Attachment.FilenameOriginal property in this case. Please note that value of this property can be an empty string in some cases, while Attachment.Filename property value can never be an empty string.
The following documentation pages should be useful for you:
Attachment.Filename and Attachment.FilenameOriginal properties.
In case if this doesn't help, please provide us with the attachment headers block from the .eml file for analysis.
Regards,
Igor
|
Back to Top |
|
|
Beachcomber Newbie
Joined: 20 August 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
Posted: 20 August 2008 at 5:39am | IP Logged
|
|
|
Thanks, Igor,
I tried the FilenameOriginal and it was blank.
I'm not really expecting the IMAP component to work out what attachments (if any) there are in the .eml - I was just expecting the file to be treated as a simple file. It's the actual .eml file's filename that I'm looking for. I'm not sure that I understand why this should be different from, e.g., a .doc file.
Thanks
Steve
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 20 August 2008 at 6:03am | IP Logged
|
|
|
Actually, there shouldn't be any difference caused by file type. The difference depends on attachment headers. E-mail client used for composing the message may add different headers for different file types. That's why we asked you to provide us with headers block of the attachment. It'd allow us to understand if necessary file name presents in the message and if it's possible to get it from there. Normally, headers block for EML attachment looks like:
Code:
Content-Type: message/rfc822; name="1.eml"
Content-Disposition: attachment; filename="1.eml" |
|
|
As you can see, the file name is specified twice and both Attachment.Filename and Attachment.FilenameOriginal properties would contain the name.
Best regards,
Andrew
|
Back to Top |
|
|
Beachcomber Newbie
Joined: 20 August 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
Posted: 20 August 2008 at 7:00am | IP Logged
|
|
|
OK, thanks Igor - looking at msg.Headers, there are 19 of them:
?msg.Headers[0]
{MailBee.Mime.Header}
Name: "Received"
Value: "from a.painless.aaisp.net.uk (81.187.30.51) by exchange.fire-defence.local (192.168.0.5) with Microsoft SMTP Server (TLS) id 8.1.291.1; Wed, 20 Aug 2008 11:17:58 +0100"
?msg.Headers[1]
{MailBee.Mime.Header}
Name: "Received"
Value: "from 174.252.187.81.in-addr.arpa ([81.187.252.174] helo=fire-defence.com)\tby a.painless.aaisp.net.uk with esmtp (Exim 4.69)(envelope-from <steve.knight@fire-defence.com>)\tid 1KVkiN-0008Ml-DN\tfor steve.knight@ucanstore.com; Wed, 20 Aug 2008 11:15:19 +0100"
?msg.Headers[2]
{MailBee.Mime.Header}
Name: "Received"
Value: "from PC30 ([192.168.0.50]) by fire-defence.com ([192.168.0.167] running VPOP3) with ESMTP for <steve.knight@ucanstore.com>; Wed, 20 Aug 2008 11:17:30 +0100"
?msg.Headers[3]
{MailBee.Mime.Header}
Name: "From"
Value: "Steve Knight <steve.knight@fire-defence.com>"
?msg.Headers[4]
{MailBee.Mime.Header}
Name: "To"
Value: "Steve Knight <steve.knight@fire-defence.com>"
?msg.Headers[5]
{MailBee.Mime.Header}
Name: "Date"
Value: "Wed, 20 Aug 2008 11:17:29 +0100"
?msg.Headers[6]
{MailBee.Mime.Header}
Name: "Subject"
Value: "One email"
?msg.Headers[7]
{MailBee.Mime.Header}
Name: "Thread-Topic"
Value: "One email"
?msg.Headers[8]
{MailBee.Mime.Header}
Name: "Thread-Index"
Value: "AckCrfMFkkEWIrCuSRKLTEQp5XCFfg=="
?msg.Headers[9]
{MailBee.Mime.Header}
Name: "Message-ID"
Value: "<014001c902ad$f3517750$d9f465f0$@knight@fire-defence.com >"
?msg.Headers[10]
{MailBee.Mime.Header}
Name: "Accept-Language"
Value: "en-GB"
?msg.Headers[11]
{MailBee.Mime.Header}
Name: "Content-Language"
Value: "en-GB"
?msg.Headers[12]
{MailBee.Mime.Header}
Name: "X-MS-Exchange-Organization-AuthAs"
Value: "Anonymous"
?msg.Headers[13]
{MailBee.Mime.Header}
Name: "X-MS-Exchange-Organization-AuthSource"
Value: "exchange.fire-defence.local"
?msg.Headers[14]
{MailBee.Mime.Header}
Name: "X-MS-Has-Attach"
Value: "yes"
?msg.Headers[15]
{MailBee.Mime.Header}
Name: "X-MS-TNEF-Correlator"
Value: ""
?msg.Headers[16]
{MailBee.Mime.Header}
Name: "x-server"
Value: "VPOP3 Enterprise V2.5.0c - Registered"
?msg.Headers[17]
{MailBee.Mime.Header}
Name: "Content-Type"
Value: "multipart/mixed"
?msg.Headers[18]
{MailBee.Mime.Header}
Name: "MIME-Version"
Value: "1.0"
Content type is "message/rfc822"
?msg.Attachments[0]
{MailBee.Mime.Attachment}
AsMimePart: {MailBee.Mime.MimePart}
ContentID: ""
ContentLocation: ""
ContentType: "message/rfc822"
Description: ""
Filename: "34a223b01cc898458516.eml"
FilenameOriginal: ""
Headers: {MailBee.Mime.HeaderCollection}
IsFile: false
IsInline: true
IsMessageInside: true
IsTnef: false
IsZip: false
LastResult: 0
Name: ""
RawHeader: "Content-Type: message/rfc822\r\n\r\n"
SavedAs: ""
Size: 2166148
ThrowExceptions: true
Not sure whether any of that helps...
Many thanks
Steve
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 20 August 2008 at 7:11am | IP Logged
|
|
|
Thank you for the information you provided. The information indicates that there's only one filename in attachment headers block: 34a223b01cc898458516.eml, no other filenames present there.
To find out whether the issue is caused by our component or not, please download the message via an email client (e.g. Outlook Express), save the message as .eml file and take headers block from it so we could compare it with the headers you provided.
Regards,
Igor.
|
Back to Top |
|
|
Beachcomber Newbie
Joined: 20 August 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
Posted: 20 August 2008 at 8:28am | IP Logged
|
|
|
Hi Igor,
The file is an email file (.eml) and itself contains some attachments. I can send you the email if you like - if so, what email address should I send it to?
Thanks
Steve
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 20 August 2008 at 10:40pm | IP Logged
|
|
|
Please use Request Support form.
Best regards,
Andrew
|
Back to Top |
|
|
Beachcomber Newbie
Joined: 20 August 2008 Location: United Kingdom
Online Status: Offline Posts: 7
|
Posted: 21 August 2008 at 1:51am | IP Logged
|
|
|
OK, I have sent a .msg file which contains an eml file - I hope that is OK.
Cheers
Steve
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 25 August 2008 at 3:48am | IP Logged
|
|
|
You've sent us an MSG file which is in proprietary MS Outlook format. Could you please provide us with the same message in standard EML format?
Best regards,
Andrew
|
Back to Top |
|
|
mkhan Newbie
Joined: 23 June 2011
Online Status: Offline Posts: 2
|
Posted: 23 June 2011 at 6:26am | IP Logged
|
|
|
Hi,
We are facing similar kind of issue with MailBee.NET Objects 5.9.
When there is an email having an attachment with .eml extension, each time we load the email the attachment name gets changed.
E.g. If the email has this information:
------_=_NextPart_003_01FF30FB.070B3000
Content-Type: application/octet-stream;
name="1502055868afc7be3765.eml"
Content-Transfer-Encoding: base64
Content-Description: 1502055868afc7be3765.eml
Content-Disposition: attachment;
filename="1502055868afc7be3765.eml"
When downloaded from the server using GetEntireMessage OR loaded from the disk using LoadMessage the attachment name '1502055868afc7be3765.eml' is not available. The attachment is there but with a new name. And this new name is not a consistent one. If we the load the same message again the name is changed again.
Can you please tell if there is something we are not doing correct?
Regards.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 23 June 2011 at 9:59pm | IP Logged
|
|
|
Does the issue persist if you try that with the latest version of MailBee.NET Objects (6.9 at the moment)?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
mkhan Newbie
Joined: 23 June 2011
Online Status: Offline Posts: 2
|
Posted: 27 June 2011 at 5:04am | IP Logged
|
|
|
Thanks Igor
We have tried it using MailBee.NET Objects V6.9 evaluation version and it has the same issue.
Note: We are downlaoding the emails using POP3.
Regards,
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 27 June 2011 at 5:11am | IP Logged
|
|
|
If you'd like to get further assistance on this, please contact us via HelpDesk, be sure to supply relevant code sample without external dependencies and the message file which can be used to reproduce the issue. Also, provide your current license key to let us check that your license maintenance is valid.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|