Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. $body = "<a href='".DIR."activate.php?x=$id&y=$activasion'>".DIR."activate.php?x=$id&y=$activasion</a>";
  2. require('classes/PHPMailerAutoload.php');
  3. $mail = new PHPMailer;
  4. $mail->CharSet = "UTF-8";
  5. $mail->SMTPDebug = 2; // Enable verbose debug output
  6. $mail->isSMTP(); // Set mailer to use SMTP
  7. $mail->Host = SMTP_HOST; // Specify main and backup SMTP servers
  8. $mail->SMTPAuth = true; // Enable SMTP authentication
  9. $mail->Username = SMTP_USER; // SMTP username
  10. $mail->Password = SMTP_PASSWORD; // SMTP password
  11. $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
  12. $mail->Port = 465; // TCP port to connect to
  13. $mail->setFrom(SMTP_USER);
  14. $mail->addAddress($to); // Add a recipient Name is optional
  15. $mail->isHTML(true); // Set email format to HTML
  16. $mail->Subject = $subject;
  17. $mail->Body = $body;
  18. $mail->AltBody = $altbody;
  19. if(!$mail->send()) {
  20. echo $mail->ErrorInfo;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement