represents a mail receiver function that applies fun to any mail message it receives.
Details and Options
- CloudDeploy[MailReceiverFunction[…]] yields a CloudObject containing metainformation specifying the email address to which mail for the mail receiver should be sent.
- For the Wolfram Cloud, the email address is typically of the form firstname.lastname@example.org, where xxxx is a unique ID assigned to each mail receiver.
- In MailReceiverFunction[fun], fun[assoc] is evaluated whenever a piece of mail is received. The association assoc is derived from the mail received.
- The following basic primary elements are usually present in the association:
"From" sender name and email address "FromAddress" sender raw email address "Subject" the subject of the email "OriginatingDate" date and time from message headers "OriginatingTimeZone" time zone from message headers "Body" message body as a string "ToList" recipient names and addresses "ToAddressList" recipient addresses "ToNameList" recipient full names "CcList" copied recipient names and addresses "CcAddressList" copied recipient addresses "CcNameList" copied recipient full names "BccList" blind-copied recipients (for Sent folder only) "ReplyToList" reply-to names and addresses "ReplyToAddressList" reply-to addresses "ReplyToNameList" reply-to full names "MessageID" unique ID for this message "ReplyToMessageID" ID of a message to which this replies, if any "AttachmentList" list of processed attachments as expressions "AttachmentDetails" lists of associations giving content and attachment elements "ReceiverAddress" email address of the mail receiver function "ReceiverRoutingType" whether the receiver is in "To", "Cc", or "Bcc"
- Additional advanced properties of MailReceiverFunction include all elements available through "MBOX" import.
- Special elements of the association include:
"Association" the complete association of all available elements
- MailReceiverFunction has the following options:
MailResponseFunction Automatic function to apply to respond to the sender ReturnReceiptFunction None function to apply if a return receipt is requested
- The function fun is evaluated in the environment of the owner of the mail receiver function.
- MailReceiverFunction[fun]["string"] decodes the string as a mail message and returns the result of applying fun to the resulting association.
- MailReceiverFunction[fun][File[…]] decodes the contents of a file as a mail message.
Examplesopen allclose all
Basic Examples (3)
Get a full message as a Dataset from an MBOX file:
Wolfram Research (2015), MailReceiverFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/MailReceiverFunction.html (updated 2016).
Wolfram Language. 2015. "MailReceiverFunction." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/MailReceiverFunction.html.
Wolfram Language. (2015). MailReceiverFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MailReceiverFunction.html