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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:07:20+00:00 2026-06-17T08:07:20+00:00

I am getting the exception as Mailbox name not allowed. The server response was:

  • 0

I am getting the exception as

Mailbox name not allowed. The server response was: Sorry, your
envelope sender is in my badmailfrom list.

Here is the code to send the email

public void SendEmail()
    {
        try
        {
            string Smtp_Client = System.Configuration.ConfigurationManager.AppSettings["Smtp_Client"];
            string NewtwrkCredentials_Uname = System.Configuration.ConfigurationManager.AppSettings["NewtwrkCredentials_Uname"];
            string NewtwrkCredentials_P = System.Configuration.ConfigurationManager.AppSettings["NewtwrkCredentials_P"];

            //Declaration a list of attendees
            MailAddressCollection macCollection = new MailAddressCollection();
            //Add attendde. In this example, I send invite to only one
            macCollection.Add(new MailAddress("****@****.com"));
            //Create mail message
            MailMessage mmMessage = formMailMessage("Test", "Test", "***.***@gmail.com", macCollection);
            //Create smtp client
            SmtpClient smtp = new SmtpClient("smtpout.europe.secureserver.net", 25);
            //Configure your smtp client
            smtp.EnableSsl = false;
            smtp.Credentials = new NetworkCredential("****@*****.com", "****");
            //Send it
            smtp.Send(mmMessage);

        }
        catch (Exception er)
        {

        }

    }

    public static MailMessage formMailMessage(string strSubject, string strBodyHTML, string Email, MailAddressCollection macAttendeeList)
    {
        //Create an instance of mail message
        MailMessage mmMessage = new MailMessage();
        //  Set up the different mime types contained in the message
        System.Net.Mime.ContentType typeText = new System.Net.Mime.ContentType("text/plain");
        System.Net.Mime.ContentType typeHTML = new System.Net.Mime.ContentType("text/html");

        AlternateView viewHTML = AlternateView.CreateAlternateViewFromString(strBodyHTML, typeHTML);
        mmMessage.AlternateViews.Add(viewHTML);
        //Adress the message
        mmMessage.From = new MailAddress(Email);
        foreach (MailAddress attendee in macAttendeeList)
        {
            mmMessage.To.Add(attendee);
        }
        mmMessage.Subject = strSubject;
        return mmMessage;
    }

Can anyone help me with the code as to what am i doing wrong? i created a console application and used the same piece of code and it worked fine. the smtp server, network credentials are all proper.

Kindly Help

  • 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-17T08:07:21+00:00Added an answer on June 17, 2026 at 8:07 am

    No idea what the issue was i used a different smtp server and the code worked.

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

Sidebar

Related Questions

I am getting exception: Specific cast is not valid, here is the code con.Open();
i'm getting exception on Transformer transformer = tFactory.newTransformer(StreamXSL); but the error below is not
I am getting an exception error, Input string was not in a correct format.
I am getting this exception: Collection was modified; enumeration operation may not execute. Directly
I am getting this exception while running any JSP on my tomcat5.5 server.Do I
I'm getting an exception from Cruise Control about not being able to connect to
Here is my AsyncTask. Getting exception in the AsyncTask.. private class GetCategories extends AsyncTask<String,
I getting leak here which is written in the appDelegate.m -(NSMutableArray*)getSalutationList { NSMutableArray *list=[[NSMutableArray
sql server 200 java 1.4 jboss 3 HI am getting exception message You cannot
I'm getting exception while creating connection with SQL Server. ISession factory is shown below

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.