Walker33 Posted December 7, 2010 Share Posted December 7, 2010 I have a form on my web page on a Windows server. I'm trying to send a simple email. My email server is on a different Linux server. That Linux server has seven different email accounts tied into into it. Whenever the "to" address resovles to one of the addresses on the Linux server, I receive the email just fine, but if it tries to send it to any other email address outside that Linux server (gmail or yahoo or whatever), I never recieve it. Not sure what to do. <?php // Sending email to person requesting free trial $to = $Email; $headers = "From: support@company.net\r\n" . ""; $subject = "Your Trial"; $body = "$Name, Thank you for requesting a free, 15-day trial!"; mail($to, $subject, $body, $headers); ?> Thanks for any help! Link to comment https://forums.phpfreaks.com/topic/220960-mail-issue/ Share on other sites More sharing options...
volatileboy Posted December 7, 2010 Share Posted December 7, 2010 I am not sure exactly what the problem is but I very much doubt that it is PHP related, I have experienced problems with the mail function in the past and it happened to be that the mail server was not reverse DNS configured so mail to external servers were never recieved. Link to comment https://forums.phpfreaks.com/topic/220960-mail-issue/#findComment-1144150 Share on other sites More sharing options...
Walker33 Posted December 7, 2010 Author Share Posted December 7, 2010 Okay, thanks. I researched quite a bit and didn't find much. Some stuff about using the host, user and pass, but nothing is working. Thanks for your input. Link to comment https://forums.phpfreaks.com/topic/220960-mail-issue/#findComment-1144155 Share on other sites More sharing options...
Rifts Posted December 7, 2010 Share Posted December 7, 2010 maybe its not working becuase your not sending to anyone? $to = $Email; Link to comment https://forums.phpfreaks.com/topic/220960-mail-issue/#findComment-1144164 Share on other sites More sharing options...
Walker33 Posted December 7, 2010 Author Share Posted December 7, 2010 Well, I didn't put that in there, but the $Email variable is gained from the form they fill out, so $Email = dave@dave.com or whatever they put in. Link to comment https://forums.phpfreaks.com/topic/220960-mail-issue/#findComment-1144171 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.