need sample code for attachment #22

Closed
raviraj555 opened this Issue Feb 24, 2012 · 1 comment

Comments

Projects
None yet
3 participants

Hi,
we are using erlang to send mail found this gen_smtp very usefully can anyone give me code snippet for sending attachment.

thanks in anticipation

Owner

Vagabond commented Feb 24, 2012

You can see a simple example for multipart/alternative in the tests, for example here:

https://github.com/Vagabond/gen_smtp/blob/master/src/mimemail.erl#L1738

You can just use binary data for the attachment body and gen_smtp will encode it and add the right headers for you.

mworrell closed this Mar 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment