The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
mail function problem
Discuss mail function problem in the PHP Development forum on Dev Shed. mail function problem PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 27th, 2000, 12:51 PM
|
|
Junior Member
|
|
Join Date: Mar 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
HI,
I have a script which is using the mail function, mail($nummer, "",$message,"From: messagecenter@message.dk");
It has worked smoothly for a while but suddenly stop working. I approached my hosting company, but they couldn’t help me. The httpd.conf files should be ok enabling php. ISP is using a linux box. The script is running on a virtual host.
Has anybody encountered the same kind of problem?
Thanks in advanc
Henrik
[This message has been edited by blicher (edited June 27, 2000).]
|

June 29th, 2000, 09:21 AM
|
 |
Banned (not really)
|
|
Join Date: Dec 1999
Location: Brussels, Belgium
|
|
|
Is it giving you any errors, like 'cannot connect' or just appearing to work but the mail never gets sent?
we just had this problem and work because the php.ini file wasn't editing to show the correct path to sendmail. when we finally edited the php.ini file, we then found out we were supposed to be editing the php3.ini file....anyways...check for the correct path to sendmail in the php.ini (php4 usually) or the php3.ini file (php3)
---John Holmes...
|

June 30th, 2000, 01:37 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi John,
It does not give any error messages. It just appear to work. I checked the httpd.conf file but it appears to be ok, so I contacted by isp to investigate. They provide the php service but they don't support third party scripts. I don't know much about the set up on a Linux box running virtual hosts, but I would assume it would be a configuration problem from my ISP? They will have to check the php.ini on the root? or am I wrong.
reards
Henrik
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by SepodatiCreations:
Is it giving you any errors, like 'cannot connect' or just appearing to work but the mail never gets sent?
we just had this problem and work because the php.ini file wasn't editing to show the correct path to sendmail. when we finally edited the php.ini file, we then found out we were supposed to be editing the php3.ini file....anyways...check for the correct path to sendmail in the php.ini (php4 usually) or the php3.ini file (php3)
---John Holmes...[/quote]
|

June 30th, 2000, 02:11 AM
|
|
Contributing User
|
|
Join Date: Jun 2000
Posts: 43
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
You could run phpinfo() and see what it says about the sendmail setup. Try this in a script called info.php3:
<?php
phpinfo();
?>
This will show all the php settings including the mail path etc.
Hope this helps.
------------------
webpatron.com
|

June 30th, 2000, 02:18 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by blicher:
HI,
I have a script which is using the mail function, mail($nummer, "",$message,"From: messagecenter@message.dk");
It has worked smoothly for a while but suddenly stop working. I approached my hosting company, but they couldn’t help me. The httpd.conf files should be ok enabling php. ISP is using a linux box. The script is running on a virtual host.
Has anybody encountered the same kind of problem?
(edited June 27, 2000).][/quote]
I work for an ISP and do some PHP support. Question: How do you know it stopped working? ie. Your friend that gets e-mailed stop getting them? Or does it e-mail you?
What tests do you do to determine when it's working?
Does your script use HTTP_POST(GET)_VARS and maybe they turn track_vars off?
Another possiblity is they have been put on something like ORBS or RSS. Make sure they're mail servers are not open relays, ask them "is your mail server an open relay?" They'll get mad if it isn't.(that's a good thing), if they don't know...I'd suggest you switch ISPs.
------------------
|

July 1st, 2000, 11:02 PM
|
|
Contributing User
|
|
Join Date: May 2000
Posts: 36
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
you seem to be missing some quotes
mail($nummer, "",$message,"From: messagecenter@message.dk");
mail("$nummer","" ,"$message","From: messagecenter@message.dk");
|

July 2nd, 2000, 12:33 PM
|
|
Junior Member
|
|
Join Date: Mar 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi Dave,
The script I'm using is sending an e-mail message to a cellular phone (sms message). I'm using the post method. I did run a info() script telling me that the path for send mail is the following "/usr/sbin/sendmail -t".
I have tried to set up the maillinglist example form this site as well and it does not work either. i.e. the recipient does not receive an e-mail.
I will ask the ISP if "is your mail server an open relay?" and see what's happening.
thanks
Henrik
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Dave Bryant:
I work for an ISP and do some PHP support. Question: How do you know it stopped working? ie. Your friend that gets e-mailed stop getting them? Or does it e-mail you?
What tests do you do to determine when it's working?
Does your script use HTTP_POST(GET)_VARS and maybe they turn track_vars off?
Another possiblity is they have been put on something like ORBS or RSS. Make sure they're mail servers are not open relays, ask them "is your mail server an open relay?" They'll get mad if it isn't.(that's a good thing), if they don't know...I'd suggest you switch ISPs.
[/quote]
|

July 3rd, 2000, 01:34 AM
|
|
Contributing User
|
|
Join Date: Jun 2000
Location: Seaside, CA
Posts: 84
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
I just went through this with my service provider. PHP was looking for sendmail in /usr/sbin/sendmail. Problem was the system had been upgraded and sendmail is in /bin/sendmail. They did a symbolic link for me that directs PHP to the right location.
|

July 4th, 2000, 10:20 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Thanks Joel,
I went back to ISP and they did change the path after I made a reference to this discussion (seems we should advatise ISP names here to get some action), however this didn't help an my ISP claims that not all php functions works on their servers. Fortunately, I'm hosting at another company as well, and I managed to call the script from that site, where it works. However, my remaining problem now is to catch the variables I passed to the script at the remote site, and using these in a thanks.html
But I will have to studdy the use of global variables further.
Thanks anyway.
Henrik
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|