Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once("./lib/class.phpmailer.php");
- $mail = new PHPMailer(true);
- $mail->SMTPSecure = 'tls';
- $mail->IsSMTP();
- $mail->Host = $smtp_server;
- $mail->Port = $smtp_port;
- $mail->SMTPAuth = true;
- $mail->Username = $smtp_user;
- $mail->Password = $smtp_password;
- $mail->AddReplyTo($sender_email, $sender_name);
- $mail->SetFrom($sender_email, $sender_name);
- $mail->AddAddress($email, $name);
- $mail->Subject = $subject;
- $mail->MsgHTML($message);
- $mail->AddAttachment($attachment);
- $mail->Send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement