Advertisement
Guest User

Untitled

a guest
Jun 19th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <?php
  2. include("class.phpmailer.php");
  3. include("class.smtp.php");
  4. $mail = new PHPMailer;
  5.  
  6. //$mail->SMTPDebug = 3; // Enable verbose debug output
  7.  
  8. $mail->isSMTP(); // Set mailer to use SMTP
  9. $mail->Host = 'smtp.mandrillapp.com'; // Specify main and backup SMTP servers
  10. $mail->SMTPAuth = true; // Enable SMTP authentication
  11. $mail->Username = 'ultimapsobb@gmail.com'; // SMTP username
  12. $mail->Password = ''; // SMTP password
  13. $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
  14. $mail->Port = 587; // TCP port to connect to
  15.  
  16. $mail->setFrom('ultima@phantasystaronline.net', 'UltimaPSOBB');
  17. $mail->addAddress('soleilrojas@gmail.com'); // Add a recipient
  18.  
  19. //$mail->isHTML(true); // Set email format to HTML
  20.  
  21. $mail->Subject = 'Here is the subject';
  22. $mail->Body = 'This is the HTML message body <b>in bold!</b>';
  23. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  24.  
  25. if(!$mail->send()) {
  26. echo 'Message could not be sent.';
  27. echo 'Mailer Error: ' . $mail->ErrorInfo;
  28. } else {
  29. echo 'Message has been sent';
  30. }
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement