Jump to content

I could not send automated email via phpmailer in my php page.


oceans

Recommended Posts

Dear People,

 

I could not send automated email via phpmailer in my php page.

 

(i) It is working fine in my wamp server.

(ii) It was working fine with my earlier server space provider for a year or so.

(iii) In fact, it was working fine with my current server space provider as well.

 

I did not did any amendment to my pages, I strongly believe it is not due to my page due to the above reason, I think it could be due to “.htaccess”.

 

Can any one help me please, thanks.

 



		ini_set("include_path", "../CSS/phpmailer");
		require("class.phpmailer.php");
		error_reporting(0);
		/*Send Email*/
		$EmailingTo = $InputFromScreen[2];
		$EmailingSubject=$InputFromScreen[1];
		$EmailingMessage="";
		$mail = new PHPMailer();
		$mail->IsSMTP();                                   // send via SMTP
		$mail->Host     = $EmailingSMTP; // SMTP servers
		$mail->SMTPAuth = true;     // turn on SMTP authentication
		$mail->Username = $EmailingUsername;  // SMTP username
		$mail->Password = $EmailingPassword; // SMTP password
		$mail->From     = $EmailingFrom;
		$mail->FromName = $EmailingFromName;
		//$mail->AddAddress("[email protected]","Josh Adams"); 
		$mail->AddAddress($EmailingTo);               // optional name
		//$mail->AddReplyTo("[email protected]","Information");
		$mail->WordWrap = 50;                              // set word wrap
		//$mail->AddAttachment("/var/tmp/file.tar.gz");      // attachment
		//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); 
		$mail->IsHTML(true);                               // send as HTML
		$mail->Subject  =  $EmailingSubject;
		$mail->Body     =  $EmailingMessage;
		$mail->AltBody  =  "";
		if(!$mail->Send())
		{
		   //echo "Mailer Error: " . $mail->ErrorInfo;
		   echo "Email Not Sent!";
		   $InputFromScreen[1]="";
		}
		else
		{
			echo "Thank You";
		}	

 

if(!$mail->Send())------ I am not getting ONE here, I am not getting any error message either (could it be error messages are turned off, if so how can I turn on).

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.