Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer;
- $mail->SMTPOptions = array('ssl' => array('verify_peer' => false,
- 'verify_peer_name' => false, 'allow_self_signed' => true));
- // $mail->SMTPDebug = 4;
- $mail->IsMail();
- $mail->Host = 'bmstestn@server2.navicosoft.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'bmstestn@server2.navicosoft.com';
- $mail->Password = 'Haroon.Iqbal3';
- $mail->SMTPSecure = 'tls';
- $mail->Port = 587;
- $mail->setFrom('bmstestn@server2.navicosoft.com', 'Masterect');
- $mail->addAddress('account@yahoo.com', 'Name');
- $mail->isHTML(true);
- $message = "Hi"; // Set email format to HTML
- $mail->Subject = 'Masterect Order Confirmation';
- $mail->Body = $message;
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- }
- else {
- echo "sent";
- }
Add Comment
Please, Sign In to add comment