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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:30:37+00:00 2026-06-11T06:30:37+00:00

Possible Duplicate: Unable to send an email to multiple addresses/recipients using C# I have

  • 0

Possible Duplicate:
Unable to send an email to multiple addresses/recipients using C#

I have used below code to send mail in script task

 string MailFromName = "Admin";
            System.Net.Mail.SmtpClient mailobj = new System.Net.Mail.SmtpClient();
            System.Net.Mail.MailAddress MailFrom = new System.Net.Mail.MailAddress(MailFromEmail, MailFromName);
            System.Net.Mail.MailAddress MailTo = new System.Net.Mail.MailAddress(MailToEmail, MailToEmail);
            System.Net.Mail.MailMessage mailmsg = new System.Net.Mail.MailMessage(MailFrom, MailTo);
            mailmsg.IsBodyHtml = true;
            mailmsg.Subject = strMessageSubject;
            mailmsg.Body = strMessageBody;
            mailobj.Host = strSMTPServerName;
            mailobj.Send(mailmsg);

It is working fine when I am using MailToEmail as “myaddress@myMail.com” i.e. for one email address

but this doesn’t send any mail(also it dosen’t fail) when I have multiple adress in to list

ex: “MyAdress@MyMail.com; MySecondAddress@MyMail.com”

How to resolve this?

EDIT New Code

 string MailFromName = "Admin";
            System.Net.Mail.SmtpClient mailobj = new System.Net.Mail.SmtpClient();
            System.Net.Mail.MailAddress MailFrom = new System.Net.Mail.MailAddress(MailFromEmail, MailFromName);
            System.Net.Mail.MailAddress MailTo = new System.Net.Mail.MailAddress(MailToEmail, MailToEmail);
            System.Net.Mail.MailMessage mailmsg = new System.Net.Mail.MailMessage(MailFrom, MailTo);
            mailmsg.IsBodyHtml = true;
            mailmsg.Subject = strMessageSubject;
            mailmsg.Body = strMessageBody;
            foreach (string str in multipleToMsg)
            {
                mailmsg.To.Add(str);
            }


            mailobj.Host = strSMTPServerName;
            mailobj.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-11T06:30:39+00:00Added an answer on June 11, 2026 at 6:30 am

    You’ve not shown how exactly you are adding the recipients. However to add multiple recipients you add to the “To” collection:

    MailMessage message = new MailMessage();
    message.To.Add("sillyjoe@stackoverflow.com");
    

    “To” is a collection of MailAddresses. Make sure you are adding it to that collection and not attempting to concatenate email addresses all into one MailAddress object.

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

Sidebar

Related Questions

Possible Duplicate: Unable to Populate TableView In PopOverController - Objective C I am using
Possible Duplicate: Conditional Linq Queries Using Entity Framework 4.0 I have a search condition
Possible Duplicate: Unable to connect to internet in Blackberry device? I'm trying to send
Possible Duplicate: Unable to locate tools.jar I'm trying to use ant to compile using
Possible Duplicate: How do you create a Perl module? I have the script that
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: Unable to get a list of installed Python modules How do I
Possible Duplicate: How to detect heart pulse rate without using any instrument in iOS

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.