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.

 

Link to comment
Share on other sites



		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("josh@site.com","Josh Adams"); 
		$mail->AddAddress($EmailingTo);               // optional name
		//$mail->AddReplyTo("info@site.com","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).

Link to comment
Share on other sites

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.