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 6374231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:27:43+00:00 2026-05-25T01:27:43+00:00

I am building a windows forms application for a school that has a very

  • 0

I am building a windows forms application for a school that has a very tight network (meaning the person I am building it for has to ask their IT services to do everything).

This application sends emails out and I am using System.Net.Mail library to do so.

        SMTPServer = new SmtpClient("SMTPAddress");

        MailMessage mailObj = new MailMessage("admin@xyz.com", emailAddressTo);

        mailObj.IsBodyHtml = true;
        mailObj.Subject = "Subject";
        mailObj.Body = "<h2>Test E-Mail Message from the TSENS</h2>";

        SMTPServer.Credentials = new System.Net.NetworkCredential(SMTPUserName, SMTPPassword);
        SMTPServer.DeliveryMethod = SmtpDeliveryMethod.Network;  //This is new code

        SMTPServer.Send(mailObj);

I’m wondering if this line: SMTPServer.DeliveryMethod = SmtpDeliveryMethod.Network; will solve the latest error message he got when trying to send out an e-mail:

Error 5.7.1

Is there something else that I am missing?

Just in case you are wondering the SMTPUserName and Password is his e-mail username and password that he uses to send and receive mail.

  • 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-25T01:27:44+00:00Added an answer on May 25, 2026 at 1:27 am

    I presume that the SMTPUsername his mailadress isn’t “admin@xyz.com” which is used as the sender of the mailmessage.

    The mailserver seems to validate if the person doing the send is allowed to send mails on behalf of admin@xyz.com which appearantly isn’t the case.

    According to the SMTP specs error 5.7.1 stands for “Unable to relay” which is what you try to do.

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

Sidebar

Related Questions

I'm building a Silverlight application that interfaces with SharePoint Web Services. In a windows
I am building a windows forms application that I will be adding a control
I am building a windows forms application using C# that needs to get launched
I'm building a small .NET Windows Forms application that talks to an Oracle database.
I am building an application in c# using windows forms which has to detect
I'm building a Windows Forms application where I have a menuStrip and a toolStripMenuItem
I'm building a .net application with windows forms. I'm pondering on the following problem:
I am building a Web Application using asp.net (C#). I come from windows forms
I'm building a windows application that search items from sharepoint document libraries, using the
I'm building a Windows Forms application in C#. How do I trigger code when

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.