Jump to content

devWhiz

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by devWhiz

  1. Try this.. <?php require 'PHPMailer-master/PHPMailerAutoload.php'; print "OK HERE WE GO<br><br>"; $activation = md5(uniqid(rand(), true)); $mail = new PHPMailer; $mail->SMTPDebug = 0; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.smtp.com'; // Specify main and backup SMTP servers //$mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'xyz.abc@any.com'; // SMTP username $mail->Password = 'password'; // SMTP password //$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 25; // TCP port to connect to $mail->From = 'xyz.abc@any.com'; $mail->FromName = 'tim'; $mail->addAddress('any.one@gmail.com', 'User'); // Add a recipient $mail->isHTML(true); // Set email format to HTML $message ="http://www.something...y=$activation"; $mail->Subject = 'Here is the subject'; $mail->Body = " $message"; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; //print "code is: $activation"; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.