php mail() not sending to mail Clients (ie, Outlook, Apple Mail,

php mail() not sending to mail Clients (ie, Outlook, Apple Mail,

am 30.11.2007 04:19:04 von shybe

I have a send mail script on my site that.

The emails are recieved by gmail, and yahoo, but not to mail clients
like Outlook, Mail, etc...)

Is this a problem with the script, or is it something I must change in
php ini file?

Thanks in advance for any help.

here is the code. (im using it in conjunction with javascript for some
AJAX stuff)

if(!isset($_GET['action']))
{
die("You must not access this page directly!"); //Just to stop people
from visiting contact.php normally
}

/* Now lets trim up the input before sending it */

$name = trim($_GET['name']); //The senders name
$to = trim($_GET['maily']); //The senders email address
$place = trim($_GET['place']); //The senders email address
$subject = "you have recieved mail";
$headers = "From:$name";
$message = "{$name} deemed you worthy of receiving the following
information/exchange from Trumpet.\n\n Follow This Link {$place}";
mail($to, $subject, $message,$headers); //a very simple send

echo 'contactarea|

Article Sent!

'; //now lets
update the "contactarea" div on the contact.html page. The
contactarea| tell's the javascript which div to update.

?>

Re: php mail() not sending to mail Clients (ie, Outlook, Apple Mail, thunderbird, etc..)

am 30.11.2007 04:34:14 von mw

shybe wrote:
> I have a send mail script on my site that.
>
> The emails are recieved by gmail, and yahoo, but not to mail clients
> like Outlook, Mail, etc...)
>
> Is this a problem with the script, or is it something I must change in
> php ini file?
>
> Thanks in advance for any help.
>
> here is the code. (im using it in conjunction with javascript for some
> AJAX stuff)
>
> if(!isset($_GET['action']))
> {
> die("You must not access this page directly!"); //Just to stop people
> from visiting contact.php normally
> }
>
> /* Now lets trim up the input before sending it */
>
> $name = trim($_GET['name']); //The senders name
> $to = trim($_GET['maily']); //The senders email address
> $place = trim($_GET['place']); //The senders email address
> $subject = "you have recieved mail";
> $headers = "From:$name";
> $message = "{$name} deemed you worthy of receiving the following
> information/exchange from Trumpet.\n\n Follow This Link {$place}";
> mail($to, $subject, $message,$headers); //a very simple send
>
> echo 'contactarea|

Article Sent!

'; //now lets
> update the "contactarea" div on the contact.html page. The
> contactarea| tell's the javascript which div to update.
>
> ?>
>

It's not a problem with the mail() function if some e-mail clients are
getting it. Maybe something to do with your e-mail formatting:

$headers = "From: $name"; should probably be
$headers = "From: \"$name\" <$email>";

Also the code snippet as you posted would be very vulnerable to script
attacks, I suggest more secure code.

Re: php mail() not sending to mail Clients (ie, Outlook, Apple Mail,

am 30.11.2007 04:58:59 von shybe

On Nov 29, 9:34 pm, MW wrote:
> shybe wrote:
> > I have a send mail script on my site that.
>
> > The emails are recieved by gmail, and yahoo, but not to mail clients
> > like Outlook, Mail, etc...)
>
> > Is this a problem with the script, or is it something I must change in
> > php ini file?
>
> > Thanks in advance for any help.
>
> > here is the code. (im using it in conjunction with javascript for some
> > AJAX stuff)
>
> > if(!isset($_GET['action']))
> > {
> > die("You must not access this page directly!"); //Just to stop people
> > from visiting contact.php normally
> > }
>
> > /* Now lets trim up the input before sending it */
>
> > $name = trim($_GET['name']); //The senders name
> > $to = trim($_GET['maily']); //The senders email address
> > $place = trim($_GET['place']); //The senders email address
> > $subject = "you have recieved mail";
> > $headers = "From:$name";
> > $message = "{$name} deemed you worthy of receiving the following
> > information/exchange from Trumpet.\n\n Follow This Link {$place}";
> > mail($to, $subject, $message,$headers); //a very simple send
>
> > echo 'contactarea|

Article Sent!

'; //now lets

Thanks so much for the response. I tried your suggestion, and Its
still isnt working.
I also tried to remove the header variable,and still no luck.

As for the insecure code. I plan on securing. I'm just trying to get
the overall functionality to work.

Any other suggestions would be greatly appreciated.

best



> > update the "contactarea" div on the contact.html page. The
> > contactarea| tell's the javascript which div to update.
>
> > ?>
>
> It's not a problem with the mail() function if some e-mail clients are
> getting it. Maybe something to do with your e-mail formatting:
>
> $headers = "From: $name"; should probably be
> $headers = "From: \"$name\" <$email>";
>
> Also the code snippet as you posted would be very vulnerable to script
> attacks, I suggest more secure code.

Re: php mail() not sending to mail Clients (ie, Outlook, Apple Mail, thunderbird, etc..)

am 30.11.2007 12:35:30 von NerdRevenge

shybe wrote:
> On Nov 29, 9:34 pm, MW wrote:
>> shybe wrote:
>>> I have a send mail script on my site that.
>>> The emails are recieved by gmail, and yahoo, but not to mail clients
>>> like Outlook, Mail, etc...)
>>> Is this a problem with the script, or is it something I must change in
>>> php ini file?
>>> Thanks in advance for any help.
>>> here is the code. (im using it in conjunction with javascript for some
>>> AJAX stuff)
>>> if(!isset($_GET['action']))
>>> {
>>> die("You must not access this page directly!"); //Just to stop people
>>> from visiting contact.php normally
>>> }
>>> /* Now lets trim up the input before sending it */
>>> $name = trim($_GET['name']); //The senders name
>>> $to = trim($_GET['maily']); //The senders email address
>>> $place = trim($_GET['place']); //The senders email address
>>> $subject = "you have recieved mail";
>>> $headers = "From:$name";
>>> $message = "{$name} deemed you worthy of receiving the following
>>> information/exchange from Trumpet.\n\n Follow This Link {$place}";
>>> mail($to, $subject, $message,$headers); //a very simple send
>>> echo 'contactarea|

Article Sent!

'; //now lets
>
> Thanks so much for the response. I tried your suggestion, and Its
> still isnt working.
> I also tried to remove the header variable,and still no luck.
>
> As for the insecure code. I plan on securing. I'm just trying to get
> the overall functionality to work.
>
> Any other suggestions would be greatly appreciated.
>
> best
>
>
>
>>> update the "contactarea" div on the contact.html page. The
>>> contactarea| tell's the javascript which div to update.
>>> ?>
>> It's not a problem with the mail() function if some e-mail clients are
>> getting it. Maybe something to do with your e-mail formatting:
>>
>> $headers = "From: $name"; should probably be
>> $headers = "From: \"$name\" <$email>";
>>
>> Also the code snippet as you posted would be very vulnerable to script
>> attacks, I suggest more secure code.
>

depends on the receiving MTA. AOL silently drops "suspicious"
emails, for example.

bill