Advertisement
Guest User

Bte

a guest
Feb 11th, 2017
1,997
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. $mail=new PHPMailer;
  2. $mail->IsSMTP();
  3. $mail->Host='smtp.zoho.com';
  4. //$mail->SMTPDebug = 4;
  5. $mail->SMTPSecure = 'ssl';
  6. $mail->Port='465';
  7. $mail->SMTPAuth=true;
  8.  
  9. $mail->Username='developer@playprevs.com';
  10. $mail->Password='entah123';
  11.  
  12. $mail->isHTML(true);
  13.  
  14. $mail->SetFrom('developer@playprevs.com','Prevs Developer');
  15.  
  16. $mail->Subject='PHPMailer Test Subject via smtp, basic with authentication';
  17. $mail->AltBody='To view the message, please use an HTML compatible email viewer!';
  18. $mail->MsgHTML('<h1>JUST A TEST!</h1>');
  19.  
  20. $mail->AddAddress($_POST['email'], $_POST['username']);
  21.  
  22. if(!$mail->send()) {
  23. $Message = 'Something error occurred while sending e-mail.';
  24. } else {
  25. $Message = 'Successfull, please check your inbox.';
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement