imapx
imapx copied to clipboard
I cant download attachments
I used sample code from codeplex
var folderPath = @"D:\EmailRead\";
foreach (var file in msg.Attachments)
{
file.Download(); // Downloading the attachment
/*
After downloading the attachment you can access its data
through the FileData property.
*/
/*
To save the file directly to disk, use the Save method.
*/
file.Save(folderPath, numeroTicket + "-" + file.FileName);
}
but never find attachments on emails. what am i make wrong?
debugging i noticed that where the Attachments variable would be load, returns empty... brownsing more, i found a piece that to validate this string
(((
("TEXT" "PLAIN" ("CHARSET" "utf-8") NIL NIL "QUOTED-PRINTABLE" 2014 67 NIL NIL NIL)
("TEXT" "HTML" ("CHARSET" "utf-8") NIL NIL "QUOTED-PRINTABLE" 7697 161 NIL NIL NIL)
"ALTERNATIVE" ("BOUNDARY" "----=_NextPart_002_0139_01D36448.C4C2A5B0") NIL NIL
)
("IMAGE" "PNG" ("NAME" "image001.png") "<[email protected]>" NIL "BASE64" 53242 NIL NIL NIL)
"RELATED" ("BOUNDARY" "----=_NextPart_001_0138_01D36448.C4C2A5B0") NIL NIL
)
("APPLICATION" "PDF" ("NAME" "=?UTF-8?Q?2_-_Pay&Go_Demo_-_Manual_Instala=C3=A7=C3=A3o.pdf?=") NIL NIL "BASE64" 1720608 NIL
("ATTACHMENT" ("FILENAME" "=?UTF-8?Q?2_-_Pay&Go_Demo_-_Manual_Instala=C3=A7=C3=A3o.pdf?=")) NIL)
"MIXED" ("BOUNDARY" "----=_NextPart_000_0137_01D36448.C4C2A5B0") NIL NIL
)
BODY[HEADER.FIELDS (FROM TO DATE SUBJECT CC CONTENT-TYPE)
at this method public MessageContent[] Parse(int level = 0, string contentNumber = "")
is this a bug?
Hi Dude,
I am not getting the attachment and also shows error("Bad Input String"),Only in the case of receiving ".eml" attachment sent through outlook .In the case of ".eml" attachment sent through Gmail , I am receiving perfectly .
Reach Out me at [email protected] , If you have any idea regarding this .
Need help to resolve this issue .