swatisonee Posted November 7, 2010 Share Posted November 7, 2010 Have a strange problem on a new server that we've migrated to. I use class.phpmailer extensively with no problems but since moving to the new one, i notice that emails sent to ids on the same domain as the sender just dont go thru . i cannot figure out why this could be happening. What could i do to resolve this problem please? Thanks: Swati. OLD SERVER : PHP 2.6.4 , MYSQL - 4.1.12 NEW SERVER PHP 3.2.4 , MYSQL 5.1.50 My code snippet <? if($_POST['submit']){ $dec = $_POST["dec"]; require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsMail(); $mail->From = "form@exam.com"; $mail->FromName = "exam"; if ($dec == "on"){ $mail->AddAddress("dec@exam.com"); // doesnt go thru $mail->AddAddress("dec@anyother.com"); // goes thru // add it } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/218000-new-server-causing-phpmailer-to-not-work/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 7, 2010 Share Posted November 7, 2010 Does the email address being put into $mail->From actually exist? Quote Link to comment https://forums.phpfreaks.com/topic/218000-new-server-causing-phpmailer-to-not-work/#findComment-1131421 Share on other sites More sharing options...
swatisonee Posted November 9, 2010 Author Share Posted November 9, 2010 yes the from address exists and also i just copied the phpfile from the old location to the new. not a fullstop or comma changed. the dbinfo is in an include statement and that was the only file we changed. really puzzled Quote Link to comment https://forums.phpfreaks.com/topic/218000-new-server-causing-phpmailer-to-not-work/#findComment-1132119 Share on other sites More sharing options...
MadTechie Posted November 9, 2010 Share Posted November 9, 2010 Where is the actual $mail->Send(); ? it seams you are setting up a email but not sending it Quote Link to comment https://forums.phpfreaks.com/topic/218000-new-server-causing-phpmailer-to-not-work/#findComment-1132126 Share on other sites More sharing options...
fonor Posted November 13, 2010 Share Posted November 13, 2010 Ohay, When u use a $mail->IsMail(); u have to be a caution, maybe your server don`t have a good configuration from mail server, try to use a SMTP account (Gmail works fine) to send your e-mails by PHP. A good link with examples its here: http://www.ogenial.com.br/blog/phpmailer-como-enviar-e-mails-atraves-do-php/ Don`t take focus on the text, only on code samples, ok? Quote Link to comment https://forums.phpfreaks.com/topic/218000-new-server-causing-phpmailer-to-not-work/#findComment-1133750 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.