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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:11:22+00:00 2026-06-07T07:11:22+00:00

When sending an email from C# with body being large is resulting in failure

  • 0

When sending an email from C# with body being large is resulting in failure in sending email

Mailbox unavailable.

The email is working fine with a smaller body. I am using html body to true property..

Thanks,
Zafar

Code:

using (MailMessage _mailMsg = new MailMessage())
                    {
                        _mailMsg.From = new MailAddress(ConfigurationManager.AppSettings["mailFrom"].ToString());
                        _mailMsg.Body = mail.Body;
                        _mailMsg.Subject = mail.Subject;
                        _mailMsg.IsBodyHtml = true;

                        foreach (string strEmailIds in mailTo)
                        {
                            if (strEmailIds != null && strEmailIds != string.Empty && strEmailIds != "")
                            {
                                if (!_mailMsg.To.Contains(new MailAddress(strEmailIds)))
                                    _mailMsg.To.Add(new MailAddress(strEmailIds));
                            }
                        }
                        //_mailMsg.CC.Add(ConfigurationManager.AppSettings["mailCC"].ToString());
                        using (SmtpClient _client = new SmtpClient(ConfigurationManager.AppSettings["Host"].ToString()))
                        {

                            if (_mailMsg.To.Count > 0)
                            {

                                _client.Send(_mailMsg);
                            }
                            else
                            {
                                _mailMsg.Subject = "No emails associated with the portfolio: " + account + " Original Email:" + mail.Subject;
                                _mailMsg.To.Add(new MailAddress(ConfigurationManager.AppSettings["mailSuppotTeam"].ToString()));
                                _client.Send(_mailMsg);
                            }
  • 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-07T07:11:24+00:00Added an answer on June 7, 2026 at 7:11 am

    The issue was with sending email to cross domain email id and was resulting in the Generic exception
    “Mailbox unavailable.” May be this is one of the reason behind the above exception.

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

Sidebar

Related Questions

I am sending email from my iPhone application. Everything working fine, but I want
I am sending an email from my iPhone app using MFMailComposeViewController. This works fine
Possible Duplicate: Sending HTML email from PHP I need to send an html mail
I have the following script for sending mails using python import smtplib from email.mime.multipart
I am sending SMTP email from my PHP website, using SendGrid SMTP mail service.
I'm using the following code from this answer Sending email in .NET through Gmail
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared
I'm sending a HTML email from Outlook to my mail.live.com account. When I view
I'm sending an email from ASP.NET using MailMessage and SmtpClient. I want to introduce
I've been getting these errors intermittently from sending email from my django app. I

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.