// Yazılım

Sending SMTP Email with PHPMailer (Hostgator)

You can use the following code to send SMTP mail using Php Mailler. After reading our article, you will see that sending SMTP mail is not difficult at all.

Of course, first of all you need to have placed the Click Here PhpMailler class in the folder. I use the class.phpmailler.php, class.smtp.php, and phpunit.php files.

 

 

 

 

$m1=$_POST['adi_'.$i];
$m2=$_POST['mail_'.$i];
require_once("class.phpmailer.php");

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.xxx.com";
$mail->SMTPAuth = true;
$mail->Username = "xxx@xx.com";
$mail->Password = "xxx";
$mail->CharSet ="utf-8";
$mail->Encoding="base64";

$mail->From = "xxx@xx.com";
$mail->Fromname = $m1;
$mail->AddAddress($m2,$m2);
$mail->Subject = "xxxx- Onay bilgilendirmesi.";
$mail->Body = ' Merhaba,<br />xxx';
$mail->IsHTML(true);

if(!$mail->Send())
{
echo '<font color="#F62217"><b>Gönderim Hatası: ' . $mail->ErrorInfo . '</b></font>';
exit;
}

 

 

 

 

// FEEDBACK

Was this useful?

Your rating shows how helpful this note is to other readers.

Was this useful?

Click the stars to rate.

Average rating 0 / 5. Total votes: 0

No one has rated this post yet. Be the first!

Sorry this post was not helpful.

Your feedback is valuable to us.

How can we make this post more helpful?

// JOIN THE CONVERSATION

Share your experience

Got a question, a different solution or a note to add?

// KEEP READING

One more note.

All posts ↗︎