| 
 Posted by Janwillem Borleffs on 11/22/05 22:05 
David Cary Hart wrote: 
> I am working on an Apache/MySQL/PHP application that sends email to a 
> third party. I want to ensure that the form originator is providing a 
> valid email address. From the command line, I would: 
>        telnet domain.tld 25 
>        HELO mail.tqmcube.com 
>        MAIL FROM: test@tqmcube.com 
>        RCPT TO: user@domain.tld 
> That will either provide OK or an error message. 
> 
> Can someone clue me in if I might be able to do this within php? 
> 
 
You can use fsockopen + fputs & fgets for this, but be aware that most SMTP  
servers reply OK even when the address isn't valid. 
 
 
JW
 
  
Navigation:
[Reply to this message] 
 |