On Wednesday, April 8, 2020 at 1:46:43 PM UTC-4, gneuner2 wrote:
>
>
> On 4/8/2020 12:54 PM, Brian Adkins wrote: 
> > I was able to write a simple wrapper around smtp-send-message and get 
> > it working through SendGrid in a few minutes (see below), but I wasn't 
> > able to find any examples of sending emails containing both a plain 
> > text version and HTML version. Can anyone point me to some examples? 
> > 
> > Thanks, 
> > Brian Adkins 
>
> You done the hard part.  Once you can send a plain text message, HTML is 
> not much harder. 
>
> You have to construct a MIME multipart message, which has a particular 
> internal structure. 
> See: 
>
> https://stackoverflow.com/questions/10631856/mime-type-to-satisfy-html-email-images-and-plain-text
>  
> http://www.enewsletterpro.com/articles/multi_part_mime_messages.asp 
> https://www.ietf.org/rfc/rfc1521.txt 
>
>
> My solution is to use message templates like the attached - which shows 
> using not just multipart but also embedded graphics.  My program 
> customizes the message by substituting for the '@' preceded "variables" 
> in the template.  Feel free to (ab)use the same style or adapt it for 
> your needs. 
>
> George 
>
>
Thanks for the info George. Are you feeding that entire template (after 
substituting the @ variables) into the smtp-send-message function as the 
message argument i.e. a list of lines? I'm also curious about having 
"subject" in the template vs. the header.

I take it from your reply there isn't already something in existence that 
streamlines this process in a similar way to a framework such as Rails.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/420bc8df-b72f-43d9-9bf4-b5dbf2dad6ed%40googlegroups.com.

Reply via email to