Rebol 编程/电子邮件
外观
< Rebol 编程
EMAILER /to target /subject what
弹出一个快速电子邮件发送器。
EMAILER 是一个函数值。
- /to -- 指定目标地址
- 目标 -- (类型:字符串电子邮件)
- /subject -- 指定主题行
- 内容 -- (类型:字符串)
emailer: func [
"Pops up a quick email sender."
/to "Specify a target address"
target [string! email!]
/subject "Specify a subject line"
what [string!]
/local req
][
if block? lo [
lo: layout lo
center-face lo
lo/color: 160.180.160
]
if not alive? [
alert "Email cannot be sent when offline."
exit
]
if not all [system/user/email system/schemes/default/host] [
req: request [{Your email settings are missing from the network preferences.
^-^-^-^-Set them now?} "Setup" "Ignore" "Cancel"]
if none? req [exit]
if all [req value? 'set-user] [set-user]
]
clear-all
if to [f-to/text: copy target]
if subject [f-subject/text: copy what]
focus f-to
view/new/title lo "Emailer"
]