7.7
smtp-lib
(require smtp-lib) | package: smtp-lib |
send emails with SMTP protocol.
1 Procedure Reference
mail struct needs specified here.
returns info about who the email was sent from.
returns info about who this email was sent to.
procedure
(mail-subject email) → string?
email : mail?
returns the email subject.
procedure
(mail-content email) → string?
email : mail?
returns the email content.
procedure
(mail-attachment-files email) → list?
email : mail?
returns a list of the email attachment file paths.
procedure
(mail-header email) → string?
email : mail?
returns header string of the email.
procedure
(mail-header/info email) → string?
email : mail?
returns sender, recipients, subject infos of an email’s header.
procedure
(mail-header/attachment email) → string?
email : mail?
returns sender, recipients, subject infos of an email’s header.
procedure
(send-smtp-mail #:host host [ #:port port #:user username] #:password password) → void? email : mail? host : string? port : integer? = 25 username : string? = (mail-from mail) password : string?
commit the email sending action.
2 Example
(define email (mail "my-email-name@qq.com" ; sender's email '("user1@qq.com", "user2@qq.com") ; recipient's emails "email subject" "email content" '("file-path1" "file-path2") ; attachment files )) (send-smtp-mail email #:host "smtp.qq.com" #:auth-user "my-email-name" #:auth-password "the-password")