Jump to content
xisto Community
Sign in to follow this  
iGuest

Sending Mail Via Telnet mail commands for telnet

Recommended Posts

This is just the basics of sending email using telnet. First you'll need to find a SMTP server that you can telnet into, me, I'm using my localhost server for this. So here's the commands prefixed with a $:$ telnet localhost 25Trying 127.0.0.1...Connected to localhost.localdomain (127.0.0.1).Escape character is '^]'.220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Thu 10 Mar 2005 20:02:09 +1300$ HELO localhost.localdomain250 localhost.localdomain Hello localdomain [127.0.0.1], pleased to meet you$ MAIL FROM: from_who@domain.com250 2.1.0 from_who@domain.com... Sender ok$RCPT TO: to_who@domain.com250 2.1.5 to_who@domain.com... Recipient ok$ DATA354 Enter mail, end with "." on a line by itself$ Subject: subject goes here$ $ Message goes here and ends with a dot$ .250 2.0.0 <some random message ID> Message accepted for delivery$ QUIT221 2.0.0 localhost.localdomain closing connectionConnection closed by foreign host.Remember the $ signs are not included and just mark when the commands you enter happen.The other shown messages, are the usual OK messages produced by the SMTP to say everything is ok, and going correctly.You can also use this method, by using PHP sockets, so you can connect to an SMTP server, pass the commands, and hopefully the mail will be checked. PHP Mail function maybe easier to use though.Subject: needs two enters after it, to be valid else it won't work. e.g. Subject: this subject\n\nOnce you've finished with the DATA you end it with a single dot on a line by itself and that's it, quit the connection and it'll be sent.Cheers,MC

Share this post


Link to post
Share on other sites

Not really.. you can mess around with your ISP's SMTP server - it will work for sure if your ISP gives out SMTP access to all its users. In fact as long as you connect to the SMTP server through your ISP's connection - there's a major fun thing that you can do: Set your originating email address to WHATEVER YOU WANT. i.e., you can have a lot of fun sending an email to your friend from say: me@whitehouse.gov ... lol.. i mean ANY address you care to type in after that MAIL FROM: <address> part.

 

When I'd learnt this trick I used to send mails to my friends stating their own address as the originating address. That way I convinced quite a few of them that I'd actually hacked into their mailbox and sent a mail to them from their own account. Lol.... :D :D ;) It sounds real stupid now (this was almost 10 yrs back) - but it DID manage to fool quite an impressive bunch :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.