Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I send an attachment with an email in Racket?

I looked at the net/smtp module which provides several functions for sending emails. However, it does not say anything about including attachments. I also used the search feature on the Racket documentation website to look for the word "attach" and nothing relevant was returned.

I have searched and searched, but to no avail. So, how do I attach files to emails in Racket?

like image 359
Alex V Avatar asked Nov 21 '12 10:11

Alex V


People also ask

How do I send a file as an attachment?

Attach a fileOn your computer, go to Gmail. Click Compose. Choose the files you want to upload. Click Open.

Can SMTP send attachments?

Sending emails with attachments using SMTP requires you to build emails in MIME format.

How do you reply to an email with an attachment?

Double click the original email and click Reply all, then the reply email will displayed in a new window; 3. Drag the attachment of the original message to the reply message.


2 Answers

Sirmail does that, I believe: https://github.com/mflatt/sirmail

like image 150
Robby Avatar answered Sep 19 '22 09:09

Robby


Email attachments use MIME.

Unfortunately, there doesn't seem to be a built-in module that will do MIME encoding. (There is one, net/mime, for doing MIME decoding.)

I've searched PLaneT too, and there, the closest library for that is bzlib/mime, but there's no documentation for it, so I can't tell you if it will do the job or not.

like image 32
Chris Jester-Young Avatar answered Sep 21 '22 09:09

Chris Jester-Young