Home > Archive > PHP SQL > January 2005 > Problem with mail() function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problem with mail() function
|
|
| Alan Cole 2005-01-15, 3:56 pm |
| I intermittently have problems with my scripts using the php mail()
function. They work most of the time and I haven't changed anything but
suddenly the scripts using the mail() function have stopped sending
e-mails as they should. e-mails directed to e-mail accounts on the same
server seem to work OK, but any e-mails to other servers don't work...
The script 'thinks' it has sent the e-mail OK as in the following
$send_check returns 'true'
$send_check = mail($toaddress, $subject, $mailcontent, $headers);
But the e-mail never actually gets to its destination, (unless the
destination e-mail account is on the same server as the file contaion
the php mail() script.)
Does anyone have any ideas what is wrong.?
Thanks.
Al.
--
Alan Cole. E-mail: justal at lineone dot net
http://www.forces-of-nature.co.uk [Coastal Sports]
http://www.tsunami-site-design.co.uk [Website Design]
http://tinyurl.com/64xrd [Plusnet ISP]
| |
| Manuel Lemos 2005-01-15, 8:56 pm |
| Hello,
on 01/15/2005 01:53 PM Alan Cole said the following:
> I intermittently have problems with my scripts using the php mail()
> function. They work most of the time and I haven't changed anything but
> suddenly the scripts using the mail() function have stopped sending
> e-mails as they should. e-mails directed to e-mail accounts on the same
> server seem to work OK, but any e-mails to other servers don't work...
> The script 'thinks' it has sent the e-mail OK as in the following
> $send_check returns 'true'
>
> $send_check = mail($toaddress, $subject, $mailcontent, $headers);
>
> But the e-mail never actually gets to its destination, (unless the
> destination e-mail account is on the same server as the file contaion
> the php mail() script.)
>
> Does anyone have any ideas what is wrong.?
If you are using Windows, it may be caused by the fact that the SMTP
server that you use may be requiring authentication to relay the
messages. If you are using Linux/Unix, it may be a problem with message
not being delivered for some reason and so they bounce to an invalid
address and so they are discarded.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
| |
| Alan Cole 2005-01-16, 8:56 am |
| In article <34td1kF4dvq0lU2@individual.net>,
Manuel Lemos <mlemos@acm.org> wrote:
> Hello,
>
> on 01/15/2005 01:53 PM Alan Cole said the following:
>
> If you are using Windows, it may be caused by the fact that the SMTP
> server that you use may be requiring authentication to relay the
> messages. If you are using Linux/Unix, it may be a problem with message
> not being delivered for some reason and so they bounce to an invalid
> address and so they are discarded.
Hmmm... If thats the case, I don't know how to sort it out, but the
scripts have been working fine for the last year or so, always sending
the e-mails to the correct address and the e-mails always seem to get
through (AFAIK). I haven't changed the script or the e-mail address that
they get sent to.
Time to contact my webhosts support team I guess.
Al.
--
Alan Cole. E-mail: justal at lineone dot net
http://www.forces-of-nature.co.uk [Coastal Sports]
http://www.tsunami-site-design.co.uk [Website Design]
http://tinyurl.com/64xrd [Plusnet ISP]
| |
| Manuel Lemos 2005-01-16, 8:57 pm |
| Hello,
on 01/16/2005 07:36 AM Alan Cole said the following:
>
> Hmmm... If thats the case, I don't know how to sort it out, but the
If you tell me which platform you are using, maybe I can advise more
accurately as what you need to do depends on the platform.
> scripts have been working fine for the last year or so, always sending
> the e-mails to the correct address and the e-mails always seem to get
> through (AFAIK). I haven't changed the script or the e-mail address that
> they get sent to.
>
> Time to contact my webhosts support team I guess.
Maybe they upgraded to a buggy PHP version or simply changed the PHP
configuration.
PHP 4.3.10 is known to be buggy but due to some security alerts many
hosting companies blindly upgraded to that version.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
|
|
|
|
|