Webspace & Domain Names This is a discussion on, mail() command not sending emails in PHP within the Freedom2Surf forum; Hello Has anyone had problems using the mail() command in PHP on F2S sites? I've been using it recently and ...

Reply
 
LinkBack Thread Tools
Old 14-01-2003, 07:21 PM   #1
Tiscali User Member
 
Join Date: May 2002
Location: Lowestoft, Suffolk
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Hello

Has anyone had problems using the mail() command in PHP on F2S sites?

I've been using it recently and it's proved to be very unpredictable. More often than not it will not send an email at all.

I've tried the simplest version...

mail("webmaster@mysite.com","Test","Test message");

and that doesn't even work.

If I check the return value from mail() it's always True, indicating success.

Anyone got any suggestions?

Paul
PaulBM is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 15-01-2003, 09:55 AM   #2
Tiscali User Member
 
Join Date: May 2002
Location: Lowestoft, Suffolk
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow

Ok, it seems to be Freedom to Surf's email servers. All my test emails arrived today, about 24hours after they were sent. Not sure why my tests took so long to arrive. :S
PaulBM is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 15-01-2003, 11:55 AM   #3
Site Founder
 
Justin's Avatar
 
Join Date: May 2002
Posts: 4,351
Thanks: 4
Thanked 4 Times in 4 Posts
Hiya,

I think that you have to specify a from email address otherwise it gets put in a queue, and is not delivered until the next morning, this is apparentley to prevent spam, I'm not sure if it's true or not, but that is what I have heard.

Regards,
__________________
Justin
Tiscali User
Justin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 15-01-2003, 12:34 PM   #4
Tiscali User Member
 
Join Date: May 2002
Location: Lowestoft, Suffolk
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
OK, that's worth remembering. But I was defining the 4th parameter with From, Cc and Reply-To in a $headers variable.
One puzzling thing was the < > signs appeared to be trimmed out.

For example

$headers = "From: Fred <fred@fred.com>";
print "<pre>";
printf ($headers);
print </pre>;


Shows...

From: Fred

I would have expected the <pre> command to display the string correctly. Because the email address appeared to be being deleted and the email didn't arrive I thought the worst.

BTW. Just ran the test today and the email arrived in seconds. There must have been a delay on the email servers yesterday, the very day I chose to test the mail() command.
PaulBM is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2003, 09:25 AM   #5
ddalley
Guest
 
Posts: n/a
Do you still have to use the cgi version of php to use the send mail function?
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-2003, 10:14 AM   #6
Site Founder
 
Justin's Avatar
 
Join Date: May 2002
Posts: 4,351
Thanks: 4
Thanked 4 Times in 4 Posts
No, I've always used the actual proper PHP version rather than the CGI version, and I've never had any problems myself, although there's one particular server that seems to have this problem more than the others, can't remember which one though.
__________________
Justin
Tiscali User
Justin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail not being received:( nusku E-Mail 2 13-11-2003 09:51 PM
Webmail Sending Mail Problem [RESOLVED] Justin Tiscali / TalkTalk News & Announcements 0 01-11-2003 10:23 AM
Problem Sending Email With Php WiSeGuY Webspace & Domain Names 7 09-11-2002 04:18 PM
Send Mail With Php kenny Webspace & Domain Names 4 10-10-2002 10:06 PM
Mail Function In Php Joost Wilbrink Webspace & Domain Names 2 13-07-2002 03:44 PM


All times are GMT. The time now is 06:34 AM.