5
$\begingroup$

Is it possible to receive emails through the mail server functionality of Mathematica with email attachments?

$\endgroup$
  • $\begingroup$ File -> Send Mail $\endgroup$ – user6014 May 10 at 13:32
9
$\begingroup$

I think you're looking for MailItem and its "Attachments" property.

Connect to a mailserver:

mail = MailServerConnect[]

Get the attachments of the last email:

mail["INBOX"][-1]["Attachments"]

More, but sparse, information is in the documentation for MailItem.

It's important to note that Mathematica itself is not a mail server and doesn't have the ability to receive mail itself - it can only interact with an existing mail server via IMAP. That existing mail server is the thing that receives mail.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.