Click here to Skip to main content
15,613,716 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
i wrote a web application with c# and Asp.Net to send an emails to multi persons
and i can send email to and cc (just one in the cc)
but i cant send to multi
another i cant put multi emails in the text box by HTML or JavaScript

and this is my Code

protected string toEmail, EmailSubj, EmailMsg,ccId,bccId;
    protected void Page_Load(object sender, EventArgs e)
        if (this.IsPostBack)
            toEmail = txttomail.Text;
        EmailSubj = Convert.ToString(txtsub.Text);
        EmailMsg = Convert.ToString(txtsub.Text);
        ccId = Convert.ToString(txtcc.Text);
        bccId = Convert.ToString(txtBCC.Text);
        //passing parameter to Email Method
        SendEmail.Email_With_CCandBCC(toEmail,ccId ,bccId ,EmailSubj, EmailMsg);
        Label1.Visible = true;
        Label1.Text = "Email Sent Successfully";
    protected void btnreset_Click(object sender, EventArgs e)
        txttomail.Text = "";
        txtsub.Text = "";
        txtsub.Text = "";
        txtBCC.Text = "";
        txtcc.Text = "";
Updated 16-Jun-15 1:02am
F-ES Sitecore 16-Jun-15 7:01am    
try putting ";;" in your cc box and see if that works. You are using a custom function to send the code which you haven't posted so it's impossible to know for sure how your code can send multiple CCs.
Sreekanth Mothukuru 16-Jun-15 7:31am    
Are you using System.Net.Mail; or System.Web.Mail; namespace?
Try to separate multiple emails using ";"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900