Here is an simple example to use PHPMailer.
$objMail = new PHPMailer;
$objMail->IsHTML(true);
$objMail->From='sender@gmail.com';
$objMail->FromName='Sender Name';
$objMail->AddEmbeddedImage("logo.jpg", 1, 'logo.jpg');
$objMail->Subject='Mail sent using PHPMailer';
$objMail->AddAddress('receiver@gmail.com', 'Receiver Name');
$objMail->AddAttachment('attachment.docx');
$objMail->Body='This is mail body';
$objMail->Send();
You can find detail documentation here



0 comments:
Post a Comment