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

  • Home
  • SEARCH
  • 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 7709181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:47:59+00:00 2026-06-01T00:47:59+00:00

I am using the code as described in this question. However get following error

  • 0

I am using the code as described in this question. However get following error when send an email.

Mailbox unavailable. The server response was: please authenticate to
use this mail server

Any ideas what could be wrong?

UPATE: Here is the code

System.Net.Mail.SmtpClient Client = new System.Net.Mail.SmtpClient(); 
MailMessage Message = new MailMessage("From", "To", "Subject", "Body"); 
Client.Send(Message); 

With following in App.config.

 <system.net> 
    <mailSettings> 
      <smtp from="support@MyDomain1.com"> 
        <network host="smtp.MyDomain1.com" port="111" userName="abc" password="helloPassword1" /> 
      </smtp> 
    </mailSettings> 
  </system.net> 
  • 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-06-01T00:48:01+00:00Added an answer on June 1, 2026 at 12:48 am

    The code posted there should work. if it doesn’t, you might try setting the username and password in code-behind rather than reading them from the web.config.

    Code sample from systemnetmail.com:

    static void Authenticate()
    {
       //create the mail message
       MailMessage mail = new MailMessage();
    
       //set the addresses
       mail.From = new MailAddress("me@mycompany.com");
       mail.To.Add("you@yourcompany.com");
    
       //set the content
       mail.Subject = "This is an email";
       mail.Body = "this is the body content of the email.";
    
       //send the message
       SmtpClient smtp = new SmtpClient("127.0.0.1");
    
       //to authenticate we set the username and password properites on the SmtpClient
       smtp.Credentials = new NetworkCredential("username", "secret"); 
       smtp.Send(mail);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using code similar to this MessageDlg('', mtWarning, [mbOK], 0); throughout my
I am currently using code similar to this: try { // IE ONLY var
As described in my question Create ISO image using PowerShell: how to save IStream
This is why I'm asking this question: Last year I made some C++ code
I am using CAGradientLayer to create a background layer, as described in this answer
Firstly, I'm using the GetHashCode algorithm described, here . Now, picture the following (contrived)
I am using std::unique_ptr in this piece of code which compiles and runs as
I'm using code that I found on the CodeProject.com for a low-level keyboard hook
I've recently started using code coverage tools (particularily Emma and EclEmma), and I really
I'm using code that takes a bitmap and converts it to 24 BPP so

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.