Process Incoming Email
Set up a listener that speaks the subject of an incoming message.
In[1]:=
listener =
ChannelListen["mailSpeak",
Speak["From " <> #Message["from"] <>
", message: " <> #Message["msg"]] &,
Permissions -> <|"Owner" -> {"Read", "Execute"}, "All" -> "Write"|>]
Out[1]=
Create a MailReceiverFunction that forwards received mail to your listener.
In[2]:=
MailReceiverFunction[With[{user = $WolframID},
ChannelSend[
user <> ":" <> "mailSpeak", <|"msg" -> #Subject,
"from" -> #From|>] &]] // CloudDeploy
Send an email to the receiver function and hear your listener speak.
In[3]:=
SendMail[<|"To" -> "receiver+d98iMkU6@wolframcloud.com",
"Subject" -> "Hello There"|>];