Jump to content

Recommended Posts

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
}
}
?>

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?

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.