電子メールの送信
電子メールの送信
| SendMail[<|"To"->address,"Subject"->subj,"Body"->text|>] | 基本的な電子メールのメッセージを送る |
| SendMail[<|…,"Body"->{expr1,expr2,…}|>] | 任意のWolfram言語式を送る |
| SendMail[<|…,"Attachments"->file|>] | ファイルを添付したメッセージを送る |
SendMail[
<|"To" -> "info@wolfram.com",
"Subject" -> "Example Message",
"Body" -> "My text"|>
]Table[Export["sinPlot" <> ToString@n <> ".jpg", Plot[Sin[x], {x, 0, 2n π}]], {n, 3}]SendMail[
<|"To" -> "info@wolfram.com",
"Subject" -> "Example Attachments",
"Body" -> "Files are attached.",
"Attachments" -> {"sinPlot1.jpg", "sinPlot2.jpg", "sinPlot3.jpg"}|>
]電子メールの本文で任意のWolfram言語式を送ることもできる.SendMailにより式が適切なファイル形式に自動的に変換され,電子メールに添付(可能な場合はインライン)される.
SendMail[
<|"To" -> "info@wolfram.com",
"Subject" -> "Sending Mathematica Expressions as Attachments",
"Body" -> {"Attach arbitrary Mathematica expressions to the body of your email.
E.g., images:
", [image],
"Mathematica graphics:
", [image],
"Sounds:
", Sound[Play[Sin[4Pi t] ^ 2Sin[440 2Pi t], {t, 0, 1}]],
"Notebooks:
", CreateDocument[{x + y, 1 / x + 1 / y}]}|>
]