Skip to main content
The 2024 Developer Survey results are live! See the results
denoise https://meta.stackexchange.com/q/131009/997587
Source Link
starball
  • 41.4k
  • 21
  • 134
  • 706

I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send even though everything is right in my script according to phpmailer code.

My code like this:

  $message = " This is testing message from my server";

  $mail = new PHPMailer(); // create a new object
  $mail->IsSMTP(); // enable SMTP
  $mail->Host = "smtp.gmail.com";
  $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  $mail->SMTPAuth = true; // authentication enabled
  $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
  $mail->Port = 465; // or 587
  $mail->IsHTML(true);
  $mail->Username = "[email protected]"; // My gmail username
  $mail->Password = "************"; // My Gmail Password
  $mail->SetFrom("[email protected]");
  $mail->Subject = "Test Mail from my Server";
  $mail->Body = $message;
  $mail->AddAddress($email);
   if($mail->Send())
      {
    print json_encode("SUCCESS");
}
else
{
    echo "Mailer Error: " . $mail->ErrorInfo;
    
}

Note: I have used " GMail " as my SMTP server and SMTPSecure is " ssl " and port is "465" and username & passwords are my GMail username & password

I used VPS shared server and I kept my php script on that server.

I think there is no problem in my php script and I don't know why it doesn't work.

I got the ERROR like this.

  2014-02-21 12:30:11   CLIENT -> SERVER: EHLO jkcorporates.com
  2014-02-21 12:30:11   CLIENT -> SERVER: AUTH LOGIN
  2014-02-21 12:30:11   CLIENT -> SERVER: bW9vcnRoaS5tcmsxMEBnbWFpbC5jb20=
  2014-02-21 12:30:11   CLIENT -> SERVER: OTk0MTI0MTE0MA==
  2014-02-21 12:30:11   SMTP ERROR: Password command failed: 534-5.7.14 
  534-5.7.14 i-_eumA> Please log in via your web browser and then try again.
  534 5.7.14 54 k76sm17979938yho.18 - gsmtp
  2014-02-21 12:30:11   CLIENT -> SERVER: QUIT
  " The ERROR is  "  SMTP connect() failed.

Please give some solution for that.
Thanks in Advance.

Remember: I use Shared Server Name 'VPS.mydomain.com' and I want to use GMail as my SMTP server to send mail to users.

I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send even though everything is right in my script according to phpmailer code.

My code like this:

  $message = " This is testing message from my server";

  $mail = new PHPMailer(); // create a new object
  $mail->IsSMTP(); // enable SMTP
  $mail->Host = "smtp.gmail.com";
  $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  $mail->SMTPAuth = true; // authentication enabled
  $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
  $mail->Port = 465; // or 587
  $mail->IsHTML(true);
  $mail->Username = "[email protected]"; // My gmail username
  $mail->Password = "************"; // My Gmail Password
  $mail->SetFrom("[email protected]");
  $mail->Subject = "Test Mail from my Server";
  $mail->Body = $message;
  $mail->AddAddress($email);
   if($mail->Send())
      {
    print json_encode("SUCCESS");
}
else
{
    echo "Mailer Error: " . $mail->ErrorInfo;
    
}

Note: I have used " GMail " as my SMTP server and SMTPSecure is " ssl " and port is "465" and username & passwords are my GMail username & password

I used VPS shared server and I kept my php script on that server.

I think there is no problem in my php script and I don't know why it doesn't work.

I got the ERROR like this.

  2014-02-21 12:30:11   CLIENT -> SERVER: EHLO jkcorporates.com
  2014-02-21 12:30:11   CLIENT -> SERVER: AUTH LOGIN
  2014-02-21 12:30:11   CLIENT -> SERVER: bW9vcnRoaS5tcmsxMEBnbWFpbC5jb20=
  2014-02-21 12:30:11   CLIENT -> SERVER: OTk0MTI0MTE0MA==
  2014-02-21 12:30:11   SMTP ERROR: Password command failed: 534-5.7.14 
  534-5.7.14 i-_eumA> Please log in via your web browser and then try again.
  534 5.7.14 54 k76sm17979938yho.18 - gsmtp
  2014-02-21 12:30:11   CLIENT -> SERVER: QUIT
  " The ERROR is  "  SMTP connect() failed.

Please give some solution for that.
Thanks in Advance.

Remember: I use Shared Server Name 'VPS.mydomain.com' and I want to use GMail as my SMTP server to send mail to users.

I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send even though everything is right in my script according to phpmailer code.

My code like this:

  $message = " This is testing message from my server";

  $mail = new PHPMailer(); // create a new object
  $mail->IsSMTP(); // enable SMTP
  $mail->Host = "smtp.gmail.com";
  $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  $mail->SMTPAuth = true; // authentication enabled
  $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
  $mail->Port = 465; // or 587
  $mail->IsHTML(true);
  $mail->Username = "[email protected]"; // My gmail username
  $mail->Password = "************"; // My Gmail Password
  $mail->SetFrom("[email protected]");
  $mail->Subject = "Test Mail from my Server";
  $mail->Body = $message;
  $mail->AddAddress($email);
   if($mail->Send())
      {
    print json_encode("SUCCESS");
}
else
{
    echo "Mailer Error: " . $mail->ErrorInfo;
    
}

Note: I have used " GMail " as my SMTP server and SMTPSecure is " ssl " and port is "465" and username & passwords are my GMail username & password

I used VPS shared server and I kept my php script on that server.

I think there is no problem in my php script and I don't know why it doesn't work.

I got the ERROR like this.

  2014-02-21 12:30:11   CLIENT -> SERVER: EHLO jkcorporates.com
  2014-02-21 12:30:11   CLIENT -> SERVER: AUTH LOGIN
  2014-02-21 12:30:11   CLIENT -> SERVER: bW9vcnRoaS5tcmsxMEBnbWFpbC5jb20=
  2014-02-21 12:30:11   CLIENT -> SERVER: OTk0MTI0MTE0MA==
  2014-02-21 12:30:11   SMTP ERROR: Password command failed: 534-5.7.14 
  534-5.7.14 i-_eumA> Please log in via your web browser and then try again.
  534 5.7.14 54 k76sm17979938yho.18 - gsmtp
  2014-02-21 12:30:11   CLIENT -> SERVER: QUIT
  " The ERROR is  "  SMTP connect() failed.

Please give some solution for that.

Remember: I use Shared Server Name 'VPS.mydomain.com' and I want to use GMail as my SMTP server to send mail to users.

Question Protected by Samuel Liew
typo/some English corrections/formatted for more readability
Source Link

iI have used phpmailer() concept to send mail to users from my shared server using php script,

  but i cantI'm not able to send even though everything is right in my script according to phpmailerphpmailer code.,

My code like this:My code like this:

Note : iNote: I have used " GMail " as my SMTP server andand SMTPSecure is " ssl " and port is "465" and"465" and username & passwords are my GMail username & password

I used VPS shared server and iI kept my php script on that server.,

iI think there is no problem in my php script and i dontI don't know why it wontdoesn't work and.

I got the ERROR like this .,I got the ERROR like this.

i almost have couple of weeks getting struggle to solve., But i cant.,

Please give some solution for that  .,

Thanks
Thanks in Advance.,

Remember :Remember: I useruse Shared Server Name 'VPS.mydomain.com' and iI want to use gmailGMail as my smtpSMTP server to send mail to users.,

i am waiting for some reply

i have used phpmailer() concept to send mail to users from my shared server using php script,

  but i cant able to send even everything is right in my script according to phpmailer code.,

My code like this:

Note : i have used " GMail " as my SMTP server and SMTPSecure is " ssl " and port is "465" and username & passwords are my GMail username & password

I used VPS shared server and i kept my php script on that server.,

i think there is no problem in my php script and i dont know why it wont work and

I got the ERROR like this .,

i almost have couple of weeks getting struggle to solve., But i cant.,

Please give some solution for that  .,

Thanks in Advance.,

Remember : I user Shared Server Name 'VPS.mydomain.com' and i want to use gmail as my smtp server to send mail to users.,

i am waiting for some reply

I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send even though everything is right in my script according to phpmailer code.

My code like this:

Note: I have used " GMail " as my SMTP server and SMTPSecure is " ssl " and port is "465" and username & passwords are my GMail username & password

I used VPS shared server and I kept my php script on that server.

I think there is no problem in my php script and I don't know why it doesn't work.

I got the ERROR like this.

Please give some solution for that.
Thanks in Advance.

Remember: I use Shared Server Name 'VPS.mydomain.com' and I want to use GMail as my SMTP server to send mail to users.

Source Link
Punniyam Moorthi
  • 893
  • 1
  • 11
  • 19

PHPMailer - SMTP ERROR: Password command failed when send mail from my server

i have used phpmailer() concept to send mail to users from my shared server using php script,

but i cant able to send even everything is right in my script according to phpmailer code.,

My code like this:

  $message = " This is testing message from my server";

  $mail = new PHPMailer(); // create a new object
  $mail->IsSMTP(); // enable SMTP
  $mail->Host = "smtp.gmail.com";
  $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
  $mail->SMTPAuth = true; // authentication enabled
  $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
  $mail->Port = 465; // or 587
  $mail->IsHTML(true);
  $mail->Username = "[email protected]"; // My gmail username
  $mail->Password = "************"; // My Gmail Password
  $mail->SetFrom("[email protected]");
  $mail->Subject = "Test Mail from my Server";
  $mail->Body = $message;
  $mail->AddAddress($email);
   if($mail->Send())
      {
    print json_encode("SUCCESS");
}
else
{
    echo "Mailer Error: " . $mail->ErrorInfo;
    
}

Note : i have used " GMail " as my SMTP server and SMTPSecure is " ssl " and port is "465" and username & passwords are my GMail username & password

I used VPS shared server and i kept my php script on that server.,

i think there is no problem in my php script and i dont know why it wont work and

I got the ERROR like this .,

  2014-02-21 12:30:11   CLIENT -> SERVER: EHLO jkcorporates.com
  2014-02-21 12:30:11   CLIENT -> SERVER: AUTH LOGIN
  2014-02-21 12:30:11   CLIENT -> SERVER: bW9vcnRoaS5tcmsxMEBnbWFpbC5jb20=
  2014-02-21 12:30:11   CLIENT -> SERVER: OTk0MTI0MTE0MA==
  2014-02-21 12:30:11   SMTP ERROR: Password command failed: 534-5.7.14 
  534-5.7.14 i-_eumA> Please log in via your web browser and then try again.
  534 5.7.14 54 k76sm17979938yho.18 - gsmtp
  2014-02-21 12:30:11   CLIENT -> SERVER: QUIT
  " The ERROR is  "  SMTP connect() failed.

i almost have couple of weeks getting struggle to solve., But i cant.,

Please give some solution for that .,

Thanks in Advance.,

Remember : I user Shared Server Name 'VPS.mydomain.com' and i want to use gmail as my smtp server to send mail to users.,

i am waiting for some reply