11-04-2010, 03:49 PM
Could I get an example of working with email attachments?
Thanks,
Jimmy Vig
Thanks,
Jimmy Vig
Email Attachments
|
11-04-2010, 03:49 PM
Could I get an example of working with email attachments?
Thanks, Jimmy Vig
11-04-2010, 03:57 PM
Sending or receiving?
11-04-2010, 03:59 PM
Receiving.
Sending is simple through the email dialog...right?
11-04-2010, 04:11 PM
Macro Macro1484
;download messages. This code does not delete them from server. To delete, use flag 2.
11-04-2010, 04:24 PM
Thanks. I saw the attachments member function but couldn't figure out how to use it. Thanks bunches!
06-20-2012, 04:24 PM
I have .eml file with a photo attachemnt, "photo.jpg" that is 217 KB.
When using MailBee.Attachment to SaveFile the photo doesn't save correctly. The saved file size is only 204 KB, and when opening with IrfanView get error "Decode error ! Not a JPEG file: starts with 0x3f 0x3f" When I open the .eml file with outlook and save the image, everything with the image works fine. Please advise, is something wrong with the email file, the image file, or is there another way to extract images that will work? QM forum won't allow EML extension. Should I attach a .txt version? I've been using this method for extracting images for quite a while without any troubles. -jim
06-20-2012, 04:37 PM
attach zip
06-20-2012, 06:04 PM
It is bug in mailbee component. I could not find a reliable workaround. Maybe tomorrow.
06-20-2012, 06:05 PM
Thanks for looking into this for me.
It's strange that it works with most things and then screws this up. -jim
06-20-2012, 06:11 PM
If you open raw text of the eml file, you see line
Content-Type: image/jpeg; name="testphoto.jpg"; charset="UTF-8"; method=base64 The charset="UTF-8"; should not be used here. Mailbee thinks that it is text and does some Unicode conversion. Saves correctly if I remove charset="UTF-8";.
06-20-2012, 06:42 PM
Neat.
I was wondering about the UTF-8. It didn't makes sense to me. I almost tested editing that, but I thought for sure it would be more complicated. Lesson...always test simple things! Thanks, Jim
06-20-2012, 06:50 PM
Unexpected solution. Cannot explain it but works.
m.CodepageMode=1 Macro Macro1765 out
06-20-2012, 06:54 PM
But does not work if message is already loaded, and probably will not work if message is received. Will need to get raw text of received message and set raw text of new message.
m.RawBody=receivedMessage.RawBody
06-20-2012, 07:29 PM
Adding m.CodepageMode=1 to my code worked like a charm.
Thanks. |
« Next Oldest | Next Newest »
|