This is a working example (except, of course, that it does not include an actual email account or password, and, for Gmail in particular, you need to take extra steps to enable plain SMTP): #lang racket
(require net/smtp net/head openssl) (let ([to "y...@example.com"] [from "m...@gmail.com"]) (smtp-send-message "smtp.gmail.com" #:port-no 465 #:auth-user from #:auth-passwd "my-password" #:tcp-connect ssl-connect from (list to) (insert-field "Subject" "net/smpt example email" (insert-field "From" from (insert-field "To" to empty-header))) '("This is an example message." "It is on multiple lines."))) The example you attached includes several syntax errors, especially relating to keyword arguments. You may find this section from The Racket Guide helpful: http://docs.racket-lang.org/guide/application.html#%28part._keyword-args%29 I will also note that I often use net/sendmail instead of net/smtp: http://docs.racket-lang.org/net/sendmail.html -Philip On Fri, Jan 19, 2018 at 3:57 AM, MHE <werb...@hans-schueren.de> wrote: > Hello , > > i want to send a email with net/smtp. > > Have attached a file with the code. > > May i ask for a working code example of net/smtp ? > > That would help a lot. > > WBR > MHE > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.