Jump to content

Send email: Difference between revisions

m (omit TI-BASIC)
Line 73:
</lang>
Possible options for EncryptionProtocol are: "SSL","StartTLS" and "TLS". This function should work fine on all the OS's Mathematica runs, which includes the largest 3: Windows, Linux, Mac OSX.
 
 
=={{header|OCaml}}==
* using the library '''smtp-mail-0.1.3'''
<lang ocaml>let h = Smtp.connect "smtp.gmail.fr";;
Smtp.helo h "hostname";;
Smtp.mail h "<john.smith@example.com>";;
Smtp.rcpt h "<john-doe@example.com>";;
let email_header = "\
From: John Smith <john.smith@example.com>
To: John Doe <john-doe@example.com>
Subject: surprise";;
let email_msg = "Happy Birthday";;
Smtp.data h (email_header ^ "\r\n\r\n" ^ email_msg);;
Smtp.quit h;;</lang>
 
=={{header|Python}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.