3 ms·
telnet host port ehlo mailback mail from: myemail@somewhere.com rcpt to: whoever@anywhere.com data mail from: "my name" <myemail@somewhere.com> rcpt to: "
by murat124 3y ago
telnet host port
ehlo mailback
mail from: myemail@somewhere.com
rcpt to: whoever@anywhere.com
data
mail from: "my name" <myemail@somewhere.com>
rcpt to: "their name" <whoever@anywhere.com>
subject: whatever
mail text goes here but don't forget an empty line between subject line and this line (as a separator of header and body)
and here
and end mail text by a single dot in a single line
like this
.
quit
for attachments or other advanced features you can use mutt, pine, or any other mail app. you can also do:
cat mail-text.txt | mail -s "subject goes here" whoever@anywhere.com
- brazzledazzle 3y agoShould be noted that telnet only works when you have unauthenticated access to your mail server.
- susam 3y agoI remember performing authentication via telnet session as well: https://susam.net/blog/auth-cram-md5.html https://susam.net/blog/auth-cram-md5.html (2011) Of course, these days, the connection should be wrapped within a TLS session and openssl s_client could be a good alternative to telnet for doing that.