5

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

Carl Lange
  • 13,065
  • 1
  • 36
  • 70
user907979
  • 51
  • 1

1 Answers1

10

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.

Carl Lange
  • 13,065
  • 1
  • 36
  • 70