Yanying Wang <yanyingwang1@gmail.com>
> (current-smtp-host "smtp.qq.com")
> (current-smtp-port 587)
> (current-smtp-username "sender1")
> (current-smtp-password "password1")
> (current-smtp-debug-mode #t)
"this is the message body of the test mail"#:from"sender1@qq.com"#:to'("recipient1@qq.com")#:cc'("recipient2@qq.com")#:bcc'("recipient3@qq.com""recipient4@qq.com")#:attached-files'("~/abc.txt")))
"this is the message body of the test1 mail"#:from"sender1@qq.com"#:to'("recipient1@qq.com")))
"this is the message body of the test2 mail"#:from"sender2@qq.com"#:to'("recipient1@qq.com")))
> (send-smtp-mail a-mail)
> (send-smtp-mail b-mail)
> (send-smtp-mail c-mail)
#:host"smtp.qq.com"#:port25#:username"sender2"#:password"password2")
> (current-smtp-body-content-type "text/html")
"<html><body> <h1>a test of html email</h1> <p>hello world!</p>"#:body-content-type"text/html"#:from"sender2@qq.com"#:to'("recipient1@qq.com")))
#:host"smtp.qq.com"#:port25#:username"sender2"#:password"password2")
"<html>\n<body>\n<div>\n<p>Taken from wikpedia</p>\n<img src=\"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==\"\nalt=\"Red dot\" />\n</div>\n</body>\n</html>"#:body-content-type"text/html"#:from"sender2@qq.com"#:to'("recipient1@qq.com")))
#:host"smtp.qq.com"#:port25#:username"sender2"#:password"password2")
Check basic info at Racket Parameters.
parameter
v:string?= "text/plain"
parameter
v:boolean?= #f
procedure
message-body[ #:fromfrom]#:toto[ #:cccc#:bccbcc#:attached-filesattached-filessubject:string?message-body:string?
procedure
[ #:hosthost#:portport#:tls-encodetls-encode#:userusernameemail:mail?
struct
recipientscc-recipientsbcc-recipientssubjectmessage-bodyattached-files))sender:string?recipients:list?cc-recipients:list?bcc-recipients:list?subject:string?message-body:string?attached-files:list?
procedure
( mail-sender email)→string?
email:mail?procedure
( mail-recipients email)→list?
email:mail?procedure
( mail-cc-recipients email)→list?
email:mail?procedure
( mail-bcc-recipients email)→list?
email:mail?procedure
( mail-subject email)→string?
email:mail?procedure
( mail-attached-files email)→list?
email:mail?
procedure
( mail-header email)→string?
email:mail?procedure
( mail-header/info email)→string?
email:mail?procedure
( mail-header/body email)→string?
email:mail?procedure
( mail-header/attachment email)→string?
email:mail?