Re: alternatives to mail()
| From: | Miguel Cruz | Date: | Thu, 25 Apr 2002 07:06:36 +0000 |
| Subject: | Re: alternatives to mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94520@lists.php.net to get a copy of this message | ||
Just to flesh it out a little more....
Split the address up and get the domain name (the part after the @).
Do a DNS lookup on that domain name for an MX record.
If that fails, look for an A record.
If that fails, give up.
If you got an address, open a socket connection to that address, port 25.
Wait for a line beginning with 2
Send HELO\n
Wait for a line beginning with 250
Send MAIL FROM:<originating@address.org>\n
Wait for a line beginning with 250
Send RCPT TO:<destination@address.org>\n
Wait for a line beginning with 250
Send DATA\n
Wait for a line beginning with 3
Send your entire message, including headers.
Send a blank line containing only a period followed by \n
Wait for a line beginning with 250
Send QUIT\n
Close connection.
miguel
On Wed, 24 Apr 2002, Evan Nemerson wrote:
> php.net/fsockopen
> php.net/sockets
>
> Have fun ;
>
>
>
> On Wednesday 24 April 2002 22:14 pm, you wrote:
> > The commercial server where my pages are hosted is having trouble
> > with the lastest version of PHP and as a result the mail() function
> > is not working. E-mailing from PHP is critical for my postcard and
> > other functions on my site. (I might as well shut four of my sites
> > without e-mail.)
> >
> > Is there a fall-back option from PHP to send mail when the mail()
> > function is not working?
> >
> > John Hughes
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Games - play chess, backgammon, pool and more
> > http://games.yahoo.com/
>
>