tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 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