Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Send-email/OCaml/send-email.ocaml
Normal file
11
Task/Send-email/OCaml/send-email.ocaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue