davich64 Posted August 18, 2009 Share Posted August 18, 2009 Hello, I have a PHP application wich generates monthly reports and then can send the report to a specific email adress. My problem is that and specific report is not being send and i cannot find out why, all reports are send through the same dynamic php code. The php code generates the message from mysql query and gets some psoted parameter to identify wich month to report. I want to know if could be making some strange mistake(all reports work except of an specific month) or the problem is my web server. $month=$_POST[month]; $state2='abcd'; $to = $_POST[mail1]; $headers = "From: [email protected]\nReply-To: [email protected]\nContent-Type: text/html; charset=iso-8859-1"; $subject = "Report $state2"; echo $to; $msg = "some html code.." mail("$to", "$subject", "$msg", "$headers"); echo "Success"; $url = "somepage.php"; echo '<meta http-equiv="refresh" content="1;URL=' . $url . '">'; Quote Link to comment https://forums.phpfreaks.com/topic/170914-php-mail-help/ Share on other sites More sharing options...
mikesta707 Posted August 19, 2009 Share Posted August 19, 2009 try removing the quotes around the parameters of the mail function Quote Link to comment https://forums.phpfreaks.com/topic/170914-php-mail-help/#findComment-901464 Share on other sites More sharing options...
fooDigi Posted August 19, 2009 Share Posted August 19, 2009 i would start by eliminating any possible culprits causing the problems. do you receive an email with just this code? mail("[email][email protected][/email]", "debug output", "test"); edit: sorry, didnt read everything... you do have it working in most instances... Quote Link to comment https://forums.phpfreaks.com/topic/170914-php-mail-help/#findComment-901466 Share on other sites More sharing options...
davich64 Posted August 19, 2009 Author Share Posted August 19, 2009 i'll try to remove the quotes tonight and report back if it works Quote Link to comment https://forums.phpfreaks.com/topic/170914-php-mail-help/#findComment-901470 Share on other sites More sharing options...
davich64 Posted August 19, 2009 Author Share Posted August 19, 2009 I just tried without the quotes, but there's no change I'm still unable to send the mail for the report corresponding to july... any ideas what could be causing this issue? could this be related to some antispam filter or a restriction from my web server? Quote Link to comment https://forums.phpfreaks.com/topic/170914-php-mail-help/#findComment-901546 Share on other sites More sharing options...
davich64 Posted August 19, 2009 Author Share Posted August 19, 2009 hmm i just tried to send the mail to an email adress hosted in the same server and it work... anyone knows how to fix this so external mail adreses like gmail or hotmail work too? Quote Link to comment https://forums.phpfreaks.com/topic/170914-php-mail-help/#findComment-901553 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.