Reputation: 1690
With smtp, i know the commands: "HELO", "MAIL FROM", "RCPT TO", "QUIT", but i don't know how can i attach one file. Anyone can help me ?
telnet smtp.xxxx.xxxx 25
helo xxxx.xxxx
mail from: [email protected]
rcpt to: [email protected]
data
subject: hi
hello
.
quit
Upvotes: 1
Views: 3933
Reputation: 3609
This is not something that can be easily done. You probably want to use a library (ex : in python) that will take care of formatting your email according to your needs.
In very brief :
If you want to get an idea of how complex it is to generate an email with a valid attachment, you can use your email client to check the source of an email with an attachment (most email clients have this feature). That should eventually convince you to avoid doing this manually :)
Upvotes: 1