Nov 21, 2009

Sending Mail Via Telnet - mail commands for telnet

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > How-To's and Tutorials > Internet > Emails

Sending Mail Via Telnet - mail commands for telnet

mastercomputers
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 25
Trying 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.localdomain
250 localhost.localdomain Hello localdomain [127.0.0.1], pleased to meet you
$ MAIL FROM: from_who@domain.com
250 2.1.0 from_who@domain.com... Sender ok
$RCPT TO: to_who@domain.com
250 2.1.5 to_who@domain.com... Recipient ok
$ DATA
354 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
$ QUIT
221 2.0.0 localhost.localdomain closing connection
Connection 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\n

Once 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

 

 

 


Comment/Reply (w/o sign-up)

jipman
Dude, if you can find a smtp server which allows you to do that, you're good, because almost every server has disabled that sort of thing.

Comment/Reply (w/o sign-up)

miCRoSCoPiC^eaRthLinG
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.... biggrin.gif biggrin.gif biggrin.gif It sounds real stupid now (this was almost 10 yrs back) - but it DID manage to fool quite an impressive bunch wink.gif

 

 

 


Comment/Reply (w/o sign-up)

jipman
tongue.gif.

If i want to spoof around i usually get myself an smtp account and use my own built mail spoofer with it wink.gif.

What age are you anyway M^E ?

I'm 17 smile.gif

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


See Also,

*SIMILAR VIDEOS*
Searching Video's for sending, mail, telnet, mail, commands, telnet
advertisement



Sending Mail Via Telnet - mail commands for telnet

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com