Dez 02
How to send an email with telnet via smtp for testing purposes? Here is an example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | telnet smtp.me.com 25 220 smtp.web.de ESMTP Web.de V4.91#2 Sun, 24 Nov 2009 16:51:20 +0100 helo yourcomputername 250 smtp.web.de Hello yourcomputername [219.99.999.999] mail from: account@web.de 250 account@web.de is syntactically correct rcpt to: empfaenger@provider.tld 250 empfaenger@provider.tld verified data 354 Enter message, ending with . on a line by itself To: anton@tirol.at; From: hugo@schlaumeier.de Subject: Jodelei Servus! Greetz, Peterli . 250 OK id=18Z6Uc-0001wm-00 Quit 221 smtp.web.de closing connection |
To send mail with auth:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | telnet smtp.me.com 25 220 smtp.web.de ESMTP Web.de V4.91#2 Sun, 24 Nov 2009 16:51:20 +0100 helo yourcomputername 250 smtp.web.de Hello yourcomputername [219.99.999.999] auth login 334 VXNlcm5hbWU6 <base64 encoded username> <repeated base64 encoded username> <base64 encoded password> <repeated base64 encoded password> 235 Authentication successful mail from: account@web.de 250 account@web.de is syntactically correct rcpt to: empfaenger@provider.tld 250 empfaenger@provider.tld verified data 354 Enter message, ending with . on a line by itself Subject: Jodelei Servus! Greetz, Peterli . 250 OK id=18Z6Uc-0001wm-00 Quit 221 smtp.web.de closing connection |
To base64 encode your username or pass, use another linux terminal and type:
1 2 | printf username | base64 printf password | base64 |
If you don’t have base64 on your system try mimencode instead.
