Hi!

I did it!
once again what I wanted to do:
I wanted to send a mail, but use "MAIL FROM:" and "RCPT TO:" from the
SMTP-Protocol and check, if the domain is accepted (nslookup MX)!
I had a perl script, that does this trick.  Unfortunately the php-mail()
can't do a "RCPT TO:" and "MAIL FROM:" explicitly (would be great in a future
release!!!) !

for them who don't know:
--
telnet mymailserver 25
HELO localhost
MAIL FROM: [EMAIL PROTECTED]
RCPT TO: [EMAIL PROTECTED]
DATA
To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Subject: TESTMAIL

This is the Body ...
.
--
the result:
.) if address is correct: mail will be delivered to [EMAIL PROTECTED],
though in the To: header is written something else.
.) if there is no user realrecipient at you.com, the mail will be resent to
[EMAIL PROTECTED] (Delivery-Error), though in the From: header is written
something else.
.) if the domain you.com doesn't exist or doesn't have a valid MX-entry,
then the RCPT TO: isn't accepted and the mail won't be sent!!!

what I did (my sendmail.pl handles 1.RCPT TO, MAIL FROM;2.Mail
Headers;3.Mail Body - all stored in $message):
$fh=popen("scripts/sendmail.pl","w");
fwrite($fh,$message);
if (pclose($fh)==0){
  echo "Mail was sent successful!";
}else{
  echo "Couldn't deliver mail (none or wrong MX-entry)!";
}

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Der zweitgrößte Lotto-Jackpot aller Zeiten: 36 Mio. DM suchen einen
Gewinner!
Jetzt online tippen und nebenbei noch eine Reise nach Las Vegas gewinnen!
http://www.get1.de/gmx-gewinnspiel2


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to