Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. require_once("./lib/class.phpmailer.php");
  2. $mail = new PHPMailer(true);
  3. $mail->SMTPSecure = 'tls';
  4. $mail->IsSMTP();
  5. $mail->Host = $smtp_server;
  6. $mail->Port = $smtp_port;
  7. $mail->SMTPAuth = true;
  8. $mail->Username = $smtp_user;
  9. $mail->Password = $smtp_password;
  10. $mail->AddReplyTo($sender_email, $sender_name);
  11. $mail->SetFrom($sender_email, $sender_name);
  12. $mail->AddAddress($email, $name);
  13. $mail->Subject = $subject;
  14. $mail->MsgHTML($message);
  15. $mail->AddAttachment($attachment);
  16. $mail->Send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement