Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
July 24, 2014, 11:29:15 AM

Pages: [1]   Go Down
  Print  
Author Topic: php mail() works on some servers not others  (Read 2341 times)
heritage972
Space Explorer
***
Offline Offline

Posts: 6


« on: June 21, 2014, 12:40:55 PM »

 A simple php command such as $result =   mail('someone@sc.rr.com', 'My Subject', 'My Message', 'FROM: myself@sc.rr.com'); will send an email message from any of LunarPages servers I use except one.  That server used to be named theta but may have been renamed.

Any one heard of such a fact or have an explanation?
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5854



« Reply #1 on: June 21, 2014, 04:46:08 PM »

When you say it "doesn't work" on that server, can you elaborate on what happens? Are you getting any error messages on that server? Are your emails going out, but are either bounced or simply disappear? In the latter case, perhaps your server IP is blacklisted as a spammer. Other people on that server should be reporting similar problems. Can you send mail to accounts on other LP servers? I wouldn't think that LP would blacklist internal servers. That would at least tell you whether it's internal or external.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
heritage972
Space Explorer
***
Offline Offline

Posts: 6


« Reply #2 on: June 21, 2014, 07:05:21 PM »

Thanks for your interest and suggestion. On the one server which will not send emails,  there are no error messages and there are no entries in the error_log.
I did not send messages to any address on that server.  I can set up a forwarder and will do that.  However I have sent to an address on a different Lunarpages server and that one was not sent from the problem server but was sent from the 'good' one.

I have email addresses in a number of places on completely different servers; e.g. South Carolina and Indiana.  It seems unlikely that all would blacklist one Lunarpages server and not the other.  However, best to check everything - stranger things have happened over the years.

At one point I thought that I was missing something in my php.ini file; e.g. the path to the email server on the problem server.  The only path I could think of was something related to sendmail but that doesn't seem reasonable.  Of course, if I look too closely quite a few things I do because I am 'told to' don't seem reasonable.

Thanks again

Will report result of your suggestion about sending to internal address.  Still think there is some internal setting at Lunarpages that I am unaware of.
Logged
heritage972
Space Explorer
***
Offline Offline

Posts: 6


« Reply #3 on: June 22, 2014, 07:45:20 AM »

Follow up on suggestion (possibly blacklist)
I sent an email with the simple script from the first post with appropriate changes from the 'bad' server and the 'good' server at Lunarpages.
The script addressed the email to an address on the 'bad' server domain with a From: on the 'bad' server domain.
When sent from the 'good' server, it was received but when sent from the 'bad' server, it was never received.

FYI of anyone else reading this episode, I am told that some servers will not send email if the From: is from a different domain.
I don't that is the case here but just to exclude that possibility, I included a From: with an address on the 'bad' server's domain.

Time delays can't be a factor; the messages that are received before I can click "Get Messages" on my email client which is open during the process.
It has been several days since the first attempts.

Still a mystery.
Logged
365supportadmin
Newbie
*
Offline Offline

Posts: 1


« Reply #4 on: June 23, 2014, 06:07:15 AM »

It could be the server end setting where the php mail function is disabled and force to use the SMTP authentication method to send email.

check out your phpinfo by uploading below code in new php file and try to find the disable_function in which make sure "mail" is not disabled

<?
phpinfo()
?>

Or may be placing ticket to support will help you.


Thanks,
365HostingSupport
Logged
heritage972
Space Explorer
***
Offline Offline

Posts: 6


« Reply #5 on: June 23, 2014, 07:24:18 AM »

Thanks 365...
Excellent suggestions.  Unfortunately (for me) I tried both suggestions last week.  Since others read these posts, I will give as much information as I can in case someone may benefit.  I have often found interesting information from other people's "woes".

1)  The only differences I could detect were that the 'good' server runs PHP 5.3.23 and the 'bad' server runs PHP 5.3.14

Since phpinfo.php sends so much information, I can never be sure exactly what could effect my situation.  I did an electronic search for any parameter containing 'mail' and I found six (6) directives containing 'mail' such as "mail.force_extra_parameters" which I understand and "Path to sendmail " which I really don't think I understand; i.e. relation to php command mail().  In any case, both servers were had identical directives.

2)  I have asked Support at Lunarpages.  For years, they have been very good and I can't really complain.  On this one, all I get are messages such as "We have passed this question one to xxx."
 Confused

I am going to try a workaround; namely redirect the command to a different server.  Since that could be interpreted as hacking, I may get into trouble.
Logged
heritage972
Space Explorer
***
Offline Offline

Posts: 6


« Reply #6 on: June 23, 2014, 07:28:22 AM »

Sorry.  I forgot to add that the first thing I did when reading your message was to find "disable_functions".  Both servers have "no value" "no value" for this directive.
Logged
heritage972
Space Explorer
***
Offline Offline

Posts: 6


« Reply #7 on: June 24, 2014, 02:24:09 PM »

If you are following this post, sorry.
Apparently this was a glitch at Lunarpages which tech support will not acknowledge.
After several messages back and forth over several days, the mail() function just started working.
Tech support never informed me that it was working or acknowledged that they did anything.
I think I made them mad by careful explanations of why their comments were wrong.
Still love them.

In any case, apparently some error by a system administrator which will never be acknowledged.
At first I thought this proved I am not crazy but my wife pointed out that this may be wrong.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: