1

suppose I have an email address [email protected] can I use this email address to send mails through the php mailer code where in the TODOs the password is the password of [email protected] and username is username or does the password always have to be crimson50 and username as [email protected] ?

/ instantiate mailer
$mail = new PHPMailer();

// configure mailer
// http://phpmailer.worxware.com/index.php?pg=methods
// http://phpmailer.worxware.com/index.php?pg=properties
// https://www.google.com/settings/u/0/security/lesssecureapps
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com";
$mail->Password = "TODO";
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->SMTPDebug = 1;
$mail->SMTPSecure = "tls";
$mail->Username = "TODO";

1 Answer 1

0

You should be able to use your own email address, not just [email protected]. Try it!

Also, to answer a question you asked elsewhere: PHPMailer does support HTML email, so you can add the a href tags around your password reset link, or even create a more webpage-like HTML email template.

Hope this helps.

1
  • I get a SMTP Error: Could not authenticate. Notice: Undefined property: PHPMailer::$ErrInfo if I use my password and email address Commented Oct 29, 2016 at 6:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .