Home > Archive > PHP DB > May 2004 > mail() function and AOL users
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 |
mail() function and AOL users
|
|
| Matt Perry 2004-05-19, 1:30 am |
| I use the following php mail function in an online applicaiton program:
mail($email, "application submitted", $message, "From:
employment@mycompany.com\r\n");
This function does not always work when I modify $message. I have
checked for null values for $message already but this does not seem to
be the problem.
I am trying to develop some sort of pattern of when this function works
and when it does not.
The only essential difference between the values I pass in for message
is the one that does not always work includes a link. Apparently anyone
useing AOL email is particularly vulnerable to this problem.
Is it likely that AOL and other mail servers sometimes block any email
from a web site if it has a link in the main body? Or should I not be
useing mail() in this manner to begin with?
-Matt
| |
| Manuel Lemos 2004-05-19, 1:30 am |
| Hello,
On 12/12/2003 04:34 AM, Matt Perry wrote:
> I use the following php mail function in an online applicaiton program:
>
> mail($email, "application submitted", $message, "From:
> employment@mycompany.com\r\n");
>
> This function does not always work when I modify $message. I have
> checked for null values for $message already but this does not seem to
> be the problem.
> I am trying to develop some sort of pattern of when this function works
> and when it does not.
> The only essential difference between the values I pass in for message
> is the one that does not always work includes a link. Apparently anyone
> useing AOL email is particularly vulnerable to this problem.
>
> Is it likely that AOL and other mail servers sometimes block any email
> from a web site if it has a link in the main body? Or should I not be
> useing mail() in this manner to begin with?
Maybe you are not generating the message headers and body properly.
Without seeing the code that you use to define $message, it is hard to tell.
I just suggest that you try this class to properly compose and send your
messages:
http://www.phpclasses.org/mimemessage
--
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
| |
| Justin Patrin 2004-05-19, 3:31 pm |
| Matt Perry wrote:
> I use the following php mail function in an online applicaiton program:
>
> mail($email, "application submitted", $message, "From:
> employment@mycompany.com\r\n");
>
> This function does not always work when I modify $message. I have
> checked for null values for $message already but this does not seem to
> be the problem.
> I am trying to develop some sort of pattern of when this function works
> and when it does not.
> The only essential difference between the values I pass in for message
> is the one that does not always work includes a link. Apparently anyone
> useing AOL email is particularly vulnerable to this problem.
>
> Is it likely that AOL and other mail servers sometimes block any email
> from a web site if it has a link in the main body? Or should I not be
> useing mail() in this manner to begin with?
>
> -Matt
Are you doing this on your own server? If so, your problem is likely due
to AOL blocking dynamic IPs from sending e-mail to them. Even if this is
a "real" server, you could still have these problems. Are you getting
bounces back?
The solution is to route all of your e-mails through a trusted mail
server, such as that of your ISP. You can use a mailing package which
sends the mail to a mail server (instead of sending it locally). One
such is PEAR's Mail package. Use the smtp backend. You can also do this
on your server. If you need more help with this, mail me off-list.
--
paperCrane <Justin Patrin>
|
|
|
|
|