PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Sep 22, 2019 5:53 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Aug 03, 2009 4:34 am 
Offline
Forum Newbie

Joined: Mon Aug 03, 2009 4:18 am
Posts: 5


Top
 Profile  
 
PostPosted: Mon Aug 03, 2009 8:04 am 
Offline
DevNet Resident
User avatar

Joined: Sun Feb 15, 2009 8:22 pm
Posts: 2119
Location: Ipswich, UK
Have you got error reporing turned up to full? (as in, E_ALL or E_STRICT)


Top
 Profile  
 
PostPosted: Mon Aug 03, 2009 8:31 am 
Offline
DevNet Resident

Joined: Sun Jun 14, 2009 3:13 pm
Posts: 1146
Are you sending it from a site hosted on Yahoo.com? If not, gmail (or even your host server) might be deleting it because the header looks forged. The from header might not be correct in the .ini file...honestly I'm not sure where it gets the $from field if is isn't specified.

Try putting in a little header information with the correct domain of your site where it is hosted.

Syntax: [ Download ] [ Hide ]
<?php
$to      = 'nobody@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: you@yourdomain.com' . "\r\n" .
    'Reply-To: you@yourdomain.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
 
mail($to, $subject, $message, $headers);
?>


Top
 Profile  
 
PostPosted: Mon Aug 03, 2009 9:50 am 
Offline
Forum Newbie

Joined: Mon Aug 03, 2009 4:18 am
Posts: 5


Top
 Profile  
 
PostPosted: Mon Aug 03, 2009 10:36 am 
Offline
DevNet Resident

Joined: Sun Jun 14, 2009 3:13 pm
Posts: 1146
Where are you running the script when it is not working? Is the .ini file you posted from the non working server or your local server where you are testing it?

Did you enable the error messages like Jackpf suggested? Does the server have SMPT installed?


Top
 Profile  
 
PostPosted: Mon Aug 03, 2009 11:32 pm 
Offline
Forum Newbie

Joined: Mon Aug 03, 2009 4:18 am
Posts: 5


Top
 Profile  
 
PostPosted: Tue Aug 04, 2009 6:54 am 
Offline
DevNet Resident
User avatar

Joined: Sun Feb 15, 2009 8:22 pm
Posts: 2119
Location: Ipswich, UK
Well "enable errors" and you'll find out won't you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group