Amit Dhamu

Software Engineer

Email Using PHPMailer

require('PHPMailer/class.phpmailer.php');

$mail = New phpmailer();
$mail->isSMTP();
$mail->FromName = 'Joe Bloggs';
$mail->From = 'joe.bloggs@gmail.com';
$mail->Sender = 'joe.bloggs@gmail.com';
$mail->AddAddress('amit@gmail.com');
$mail->Subject = 'Test Subject';
$mail->Body = 'This is a test message';
$mail->WordWrap = 100;

// Attachments - Optional
$mail->AddAttachment('images/photo.jpg', $name = 'photo.jpg', $encoding = 'base64', type = 'application/octet-stream');

if ($mail->Send()) {
    // Mail Successfully Sent
} else {
    // Mail Not Sent
    echo $mail->ErrorInfo;
}

 phpmailer / mail / php

Device and Size DetectionID Is Like

Show Comments

Made with by Amit Dhamu.
© MMXX. All rights reserved.