Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email Attachments
#13
Unexpected solution. Cannot explain it but works.

m.CodepageMode=1

Macro Macro1765
Code:
Copy      Help
out
str eml="$desktop$\email.eml"
;str eml="$desktop$\email - copy.eml"
eml.expandpath

;save attachments here
str folderForAttachments.expandpath("$desktop$\folderForAttachments")
mkdir folderForAttachments

MailBee.Message m._create

m.CodepageMode=1
;m.Codepage=65001

m.ImportFromFile(eml)
;out m.Attachments.Count
MailBee.Attachment t
foreach t m.Attachments ;;for each attachment
,out t.Filename
,
,if(!t.SaveFile(folderForAttachments t.Filename)) out "Failed to save"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)