Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7054037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:34:39+00:00 2026-05-28T03:34:39+00:00

I am using php mailer class. I am getting : SMTP Error: The following

  • 0

I am using php mailer class. I am getting :
SMTP Error: The following recipients failed: s_deshmukh88@hotmail.com

$mail = new phpMailer();
$body             = "Hello, this is a test mail.";
//$body             = preg_replace('/\\\\/','', $body); //Strip backslashes

$mail->IsSMTP();                           // tell the class to use SMTP
//$mail->SMTPAuth   = true;                  // enable SMTP authentication
//$mail->Port       = 25;                    // set the SMTP server port
$mail->Host       = "localhost";           // SMTP server
$mail->Username   = "localhost";     // SMTP server username
$mail->Password   = "password";            // SMTP server password
//$mail->SMTPSecure   = "tls";
//$mail->IsSendmail();  // tell the class to use Sendmail

$mail->AddReplyTo("name@domain.com","First Last");

$mail->From       = "name@domain.com";
$mail->FromName   = "First Last";

$to = "s_deshmukh88@hotmail.com";

$mail->AddAddress($to);

$mail->Subject  = "First PHPMailer Message";

$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->WordWrap   = 80; // set word wrap

$mail->MsgHTML($body);

$mail->IsHTML(true); // send as HTML

if($mail->Send()){
    echo 'Message has been sent.';
    }

What can be the reason ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:34:40+00:00Added an answer on May 28, 2026 at 3:34 am

    I had this problem using authenticated SMTP. When I tested my mailing from home using xampp but connected to a (shared) server, emails went to users without problems. When I tried the same thing with the PHP on the host server, emails went through to addresses on my account but NOT to external addresses. (Ie. if my address is fred@bloggs.com and I send an email to fred@bloggs.com, it goes through but if I send it to jim@smith.com, it fails) The solution turned out to be to use the full host address when working on my local pc, ie $mail->Host = “mail.fred.bloggs.com”, but $mail->Host = “localhost” on the server. May seem perverse but it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using php mailer class to send multiple attachment mails. Two error are
I have send an email using php mailer class. mail was sending successfully but
I'm trying to accomplish the following, I'm sending a HTML email using PHP Mailer
i am using phpmailer and i am getting following error: Message was not sent
I'm using PHP mail and I have the following headers: MIME-Version: 1.0 Content-Type: text/html;
I am trying to send email through gmail using PHPMailer_V5.1. Getting the following error,
I'm trying to send SMTP e-mails using PHPMailer, but I keep getting this error
I am using PHP Swift Mailer to send a bulk mail to a set
I'm trying to extend the PHP mailer class from Worx by adding a method
I'm having issues sending emails using the php mail() function. I know the php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.