[racket] Can't figure out how to send an image with an email

From: Greg Hendershott (greghendershott at gmail.com)
Date: Sun Oct 21 12:12:23 EDT 2012

I think you'll need to make the body be in the form of a multipart message
to do attachments. If you also want the images to be inline, you'll need an
HTML part laying out where.

On Saturday, October 20, 2012, Daniel Force wrote:

> Does anyone know how to send an image with an email? I can't find any
> documentation online.
>
> I can send the list-of-strings email via the following code just fine:
>
> (require (lib "smtp.ss" "net")
>          (lib "dns.ss" "net")
>          (lib "mzssl.ss" "openssl")
>          (lib "head.ss" "net"))
>
> (smtp-send-message
>  (dns-get-address (dns-find-nameserver) "smtp.gmail.com") ; server-string
>  "dummy at gmail.com <javascript:;>" ; from-string
>  '("joe at smoo.com <javascript:;>") ; to-list-of-strings
>  (standard-message-header
>                           "dummy at gmail.com <javascript:;>"
>                           '("joe at smoo.com <javascript:;>")
>                           '()
>                           '()
>                           "The subject is..."
> )
>  `("Howdy, Just testing... "  ) ;; message-list-of-strings/bytes
>  #:port-no 465
>  #:auth-user "dummy"  ; for gmail don't include the @gmail.com
>  #:auth-passwd " abc def ghi jkl " ; gmail special password that bypasses
> dual
> verification
>  #:tcp-connect ssl-connect)
>
> Thanks,
> Dan
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121021/60acd835/attachment.html>

Posted on the users mailing list.