0

how do i know what is the password and username for phpmailer for pset7. i am using the off campus smtp server smtp.comcast.net but everytime i try to send an email it gets rejected due to the need of authentication .

this is the error : cThe following From address failed: root@localhost : MAIL not accepted from server,550,5.1.0 Authentication required

SMTP server error: 5.1.0 Authentication required

SMTP server error: 5.1.0 Authentication required

.

require_once("PHPMailer/class.phpmailer.php");

$mail = new PHPMailer();

// use your ISP's SMTP server (e.g., smtp.fas.harvard.edu if on campus or smtp.comcast.net if off campus and your ISP is Comcast)

$mail->IsSMTP(); $mail->Host = "smtp.comcast.net"; $mail->SetFrom("[email protected]"); $mail->AddAddress("[email protected]"); $mail->Subject = "hello, world"; $mail->Body = "hello, world"; if ($mail->Send() === false) die($mail->ErrorInfo . "\n");

1
  • Wouldn't it be YOUR email address and password with SMTP being your provider? (Gmail) The email is coming from you, so it needs to login to your account and send from your account
    – lethaljd
    Commented Nov 20, 2014 at 12:47

1 Answer 1

0

Some e-mail services like yahoo mail require authentication. Gmail doesn't, you might want to go with that.

You must log in to answer this question.

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