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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:10:59+00:00 2026-05-13T21:10:59+00:00

I’ve got a C# application going that needs to send out an html email

  • 0

I’ve got a C# application going that needs to send out an html email via smtp. The email gets sent just fine, but the default security setting on outlook (Low) classifies it as junk email.

It’s not exactly a showstopper issue, but this is rather annoying, especially since the junk folder turns off html. I don’t want to have to make everyone at my company do something special to receive these emails in a readable fashion, does anyone know what I could be doing that makes outlook think this is junk email?

Code that makes the email (basic stuff.) Config is an object that holds strings related to the configuration of this stuff, toList is a list of email addresses, body/subject are filled by other function calls.

Edit: To add, at the moment I’m just sending it out to myself. In the live version, we’ll be looking at less than a hundred people being sent to in a worst-case.

Another Edit: It turned out to be happening much much more often for the longer emails I was generating the other day (~200-300 lines at the worst), and not the shorter emails I’m generating now. That’s a reasonable enough filter criteria, I suppose.

        SmtpClient smtp = new SmtpClient(config.SmtpServer);

        NetworkCredential net = new NetworkCredential();
        net.UserName = config.SmtpLogin;
        net.Password = config.SmtpPass;

        smtp.Credentials = net;

        MailMessage msg = new MailMessage();
        msg.IsBodyHtml = true;
        msg.Priority = MailPriority.Normal;
        msg.To.Add(String.Join(",", toList.ToArray()));
        msg.From = new MailAddress(fromAddr, "Build Server");
        msg.Body = "Blah html is here";
        msg.Subject = "Build successful: #numberhere and stuff";

        try
        {
            smtp.Send(msg);
        }
        catch (SmtpException)
        {
            //stuff
        }
  • 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-13T21:11:00+00:00Added an answer on May 13, 2026 at 9:11 pm

    I think this is less of a programming issue and more of a configuration issue. The recipients need to add fromAddr to their “Safe Senders List”.

    The thing is, if there were a way to configure an e-mail to bypass the junk mail filter then all the spammers will be doing it.

    If it’s a matter of crafting the perfect non-junk-looking e-mail then it may work sometimes and not others. And all the spammers will be doing it.

    You’re going to have to tell everyone to allow e-mails from that account. And you probably shouldn’t start that e-mail with any unnecessary anatomical or medicinal references.

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

Sidebar

Ask A Question

Stats

  • Questions 404k
  • Answers 404k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I appologize for the code differenc but this is C#… May 15, 2026 at 5:33 am
  • Editorial Team
    Editorial Team added an answer In your example, GridSplitter is being placed in the first… May 15, 2026 at 5:33 am
  • Editorial Team
    Editorial Team added an answer All modern browsers, including IE8, allow the user to disallow… May 15, 2026 at 5:33 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.