DONT SPAM
Validating and email address before (or without) sending an email
See http://www.ietf.org/ for
Peter L. Berghold says:
The procedure is pretty simple, well at least in concept.
- Open a connection to the system with the MTA running on it on TCP port 25. [Ed: or telnet mailserver 25]
- Establish who you are with the server using the HELO syntax example:
The PIC sends--HELO picbox1The MTA replies with--
250 mailrelay.mydomain.tld Hello picbox1.mydomain.tld Pleased to meet you
- Establish who you are sending mail from
The PIC sends --mail from: picbox@mydomain.tldThe MTA replies with --
250 picbox@mydomain.tld... sender ok
- Establish who is to get the mail
The PIC sends --rcpt to: someone@domain.tldThe MTA replies with --
250 someone@domain.tld... Recipient ok
- Now you want to send a message body.
The PIC sends ---dataThe MTA replies with --
354 Enter mail, end with "." on a line by itself
- Now you can actually compose the mail. If you want the sender, and a subject to appear on the recipient's mail program's display you need to have your first two lines be:
From: Pic Program Subject: Overtemp in the engine room. Warp drive meltdown imminent.(I couldn't resist the StarTrek reference! <VBG>)
- You want a blank line between the subject line and the body of the text so the recipient's mail program will properly parse out the headers. Another thing is if you are going to generate HTML mail you want to have right after the Subject: line a line reading "Content-Type: text/html" There are other MIME types that you can specify, but I'm not going into the complicated subject of MIME encoding standards, headers, parsing and all that.
- Once the body of your message is done you terminate the message with a line with a "." all by its lonesome just as the reply above tells you to. When you do you will get a reply back from the MTA
250 UAA01680 Message accepted.The portion UAA01580 is a queue ID that you can possibly use later on for auditing purposes, but I leave that up to other imaginations.
See also:
Connecting to remote mail server via telnet <domain> 25 for anonymous test ... replace <domain> with the domain name of the mailserver. replace <ip> with the IP address of the mail server
<<< 220 ... >>> HELO rr.com <<< 250 proxyplus.universe Relay test 1 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@rr.com> <<< 250 OK <spamtest@rr.com> >>> RCPT TO:<fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 2 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest> <<< 250 OK <spamtest> >>> RCPT TO:<fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 3 >>> RSET <<< 250 Reset state >>> MAIL FROM:<> <<< 250 OK <> >>> RCPT TO:<fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 4 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 5 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@[<IP>]> <<< 250 OK <spamtest@[<IP>]> >>> RCPT TO:<fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 6 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<fakerelaytest%rr.com@<domain>> <<< 550 Relaying disabled Relay test 7 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<fakerelaytest%rr.com@<domain>> <<< 550 Relaying disabled Relay test 8 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<"fakerelaytest@rr.com"> <<< 550 Relaying disabled Relay test 9 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<"fakerelaytest%rr.com"> <<< 550 Relaying disabled Relay test 10 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<fakerelaytest@rr.com@<domain>> <<< 550 Relaying disabled Relay test 11 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@dt0b0nf0.san.rr.com> <<< 250 OK <spamtest@dt0b0nf0.san.rr.com> >>> RCPT TO:<"fakerelaytest@rr.com"@dt0b0nf0.san.rr.com> <<< 550 Relaying disabled Relay test 12 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<fakerelaytest@rr.com@<domain>> <<< 550 Relaying disabled Relay test 13 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<@<domain>:fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 14 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<@<domain>:fakerelaytest@rr.com> <<< 550 Relaying disabled Relay test 15 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@> <<< 250 OK <spamtest@> >>> RCPT TO:<fakerelaytest@rr.com@> <<< 550 Relaying disabled Relay test 16 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<rr.com!fakerelaytest> <<< 550 Relaying disabled Relay test 17 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<rr.com!fakerelaytest@<domain>> <<< 550 Relaying disabled Relay test 18 >>> RSET <<< 250 Reset state >>> MAIL FROM:<spamtest@<domain>> <<< 250 OK <spamtest@<domain>> >>> RCPT TO:<rr.com!fakerelaytest@<domain>> <<< 550 Relaying disabled
see also:
Comments:
file: /Techref/inet/smtpsend.htm, 8KB, , updated: 2007/11/21 22:14, local time: 2024/12/21 06:08,
18.118.32.224:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/TECHREF/inet/smtpsend.htm"> Sending EMail via an SMTP Server</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.