require("class.phpmailer.php"); $msg = $_POST['msg']; $subject = $_POST['subject']; $mail = new PHPMailer(); #$mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "branddesignexpress.com/cpanel"; $mail->SMTPAuth = true; $mail->Username = 'admin@example.com'; $mail->Password = 'xxxxxx'; $mail->From="mailer@example.com"; $mail->FromName="My site's mailer"; $mail->Sender="mailer@example.com"; $mail->AddReplyTo("replies@example.com", "Replies for my site"); $mail->AddAddress("plasteezy@yahoo.com"); $mail->Subject = $subject; $mail->IsHTML(true); $mail->AddAttachment('http://www.branddesignexpress.com/images/homepage_mainimage.jpg', 'homepage_mainimage.jpg'); $mail->AddEmbeddedImage('homepage_mainimage.jpg', 'logoimg', 'homepage_mainimage.jpg'); // attach file logo.jpg, and later link to it using identfier logoimg $mail->Body = $msg; $mail->AltBody="This is text only alternative body."; if(!$mail->Send()) { echo "Error sending: " . $mail->ErrorInfo;; } else { echo "Letter is sent"; }
$mail->Host = "branddesignexpress.com/cpanel";
$mail->Host = "mail.myfavouritehostingcompany.com";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)