| 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 ... |
![]() |
![]() |
|
LinkBack | Thread Tools | ![]() |
|
|
#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 |
|
|
|
|
|
#2 |
|
Tiscali User Member
Join Date: May 2002
Location: Lowestoft, Suffolk
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
|
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
|
|
|
|
|
|
#3 |
|
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 |
|
|
|
|
|
#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.
|
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
Do you still have to use the cgi version of php to use the send mail function?
|
|
|
|
#6 |
|
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 |
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mail not being received:( | nusku | 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.









