Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $body = "<a href='".DIR."activate.php?x=$id&y=$activasion'>".DIR."activate.php?x=$id&y=$activasion</a>";
- require('classes/PHPMailerAutoload.php');
- $mail = new PHPMailer;
- $mail->CharSet = "UTF-8";
- $mail->SMTPDebug = 2; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = SMTP_HOST; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = SMTP_USER; // SMTP username
- $mail->Password = SMTP_PASSWORD; // SMTP password
- $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 465; // TCP port to connect to
- $mail->setFrom(SMTP_USER);
- $mail->addAddress($to); // Add a recipient Name is optional
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = $subject;
- $mail->Body = $body;
- $mail->AltBody = $altbody;
- if(!$mail->send()) {
- echo $mail->ErrorInfo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement