homepage Welcome to WebmasterWorld Guest from 54.226.43.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Can't send email via PHP Mail() after host change
dpinion




msg:4287426
 3:09 pm on Mar 25, 2011 (gmt 0)

Greetings All,
On our site we have forms users can submit to request product information. We were previously on a shared hosting plan and everything was working fine. We recently switched to a Virtual dedicated server, and since then have not been able to receive the emails from the forms. The server is CentOS and SMTP is enabled. From my PHP.ini file:


[mail function]
; For Win32 only.
;SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@localhost.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "/usr/sbin/sendmail -t -i"


I am assuming these are correct values and that I would not have to bother with the "Win32 only" values. I have checked the maillog files and they are empty. Could someone please point me in a direction to start troubleshooting this issue?

Thanks

 

coopster




msg:4291069
 1:13 am on Apr 2, 2011 (gmt 0)

Check your message transfer agent configuration as that is what the PHP mail() function interacts with. Likely a permissions issue.

dpinion




msg:4291568
 8:24 pm on Apr 3, 2011 (gmt 0)

Thanks for the reply. Some updates: it seems that PHP mail is actually sending OK, as I can receive email through either gmail or yahoo accounts. However. I cannot receive email through our example.com addresses. Our site is currently being hosted separately from our domain registrar(who also handles our mail/MX records). It seems that our web server example.com will NOT send email to our actual example.com email addresses, but rather the mail is kept internal to the web host. Where do I look to try to send the example.com email addresses to mailboxes that are outside of the web server? I hope this makes sense. I am a bit confused at this point.

coopster




msg:4291947
 7:21 pm on Apr 4, 2011 (gmt 0)

Me too, but it sounds like DNS/routing issues. I would begin with your hosting provider.

dpinion




msg:4291961
 7:45 pm on Apr 4, 2011 (gmt 0)

Coopster,
I got it fixed. Thank you for wanting to help. I had to run a command in ssh to disable the web host's internal mail handling so it would be handled by the proper mailbox.

coopster




msg:4291971
 7:55 pm on Apr 4, 2011 (gmt 0)

Can you offer any details? Exemplify any particulars, of course. I'm curious what you had to modify? I'm guessing it was a mail configuration but I would like to know what it was ... as may future readers.

dpinion




msg:4291979
 8:06 pm on Apr 4, 2011 (gmt 0)

No problem Coopster. I hate when I find posts where someone says they solved it but offer no resolution. In my case i needed to run the following command:

/usr/local/psa/bin

./domain --update domain.com -mail_service false

This shut down the internal mail server and let our actual delivery method be used. This was with a 1and1 cloud hosting package with plesk 10.2. Logged in via ssh using PUTTY to execute the command.. :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved