Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: WCF - Client Wait Other Client Pin
dataminers18-Oct-09 20:53
dataminers18-Oct-09 20:53 
AnswerRe: WCF - Client Wait Other Client [modified] Pin
Mirko198018-Oct-09 23:08
Mirko198018-Oct-09 23:08 
Questioncustom control events Pin
teknolog12318-Oct-09 10:00
teknolog12318-Oct-09 10:00 
AnswerRe: custom control events Pin
DaveyM6918-Oct-09 10:22
professionalDaveyM6918-Oct-09 10:22 
GeneralRe: custom control events Pin
teknolog12318-Oct-09 12:01
teknolog12318-Oct-09 12:01 
GeneralRe: custom control events Pin
Dave Kreskowiak18-Oct-09 12:51
mveDave Kreskowiak18-Oct-09 12:51 
GeneralRe: custom control events Pin
teknolog12319-Oct-09 5:29
teknolog12319-Oct-09 5:29 
QuestionSave everything but the blob to DB Pin
JRivord18-Oct-09 8:46
JRivord18-Oct-09 8:46 
AnswerRe: Save everything but the blob to DB Pin
Not Active18-Oct-09 9:28
mentorNot Active18-Oct-09 9:28 
GeneralRe: Save everything but the blob to DB Pin
JRivord18-Oct-09 9:50
JRivord18-Oct-09 9:50 
GeneralRe: Save everything but the blob to DB Pin
Not Active18-Oct-09 10:18
mentorNot Active18-Oct-09 10:18 
QuestionBindingContext question Pin
HarrisonBrock18-Oct-09 7:41
HarrisonBrock18-Oct-09 7:41 
AnswerRe: BindingContext question Pin
dataminers18-Oct-09 11:16
dataminers18-Oct-09 11:16 
GeneralRe: BindingContext question Pin
HarrisonBrock18-Oct-09 12:42
HarrisonBrock18-Oct-09 12:42 
QuestionListboxes etc. on top of video Pin
lvq68418-Oct-09 7:29
lvq68418-Oct-09 7:29 
AnswerRe: Listboxes etc. on top of video Pin
Not Active18-Oct-09 9:26
mentorNot Active18-Oct-09 9:26 
GeneralRe: Listboxes etc. on top of video Pin
lvq68418-Oct-09 22:04
lvq68418-Oct-09 22:04 
QuestionTrying to send email... Pin
JollyMansArt18-Oct-09 6:50
JollyMansArt18-Oct-09 6:50 
I want to be able to pass a string into this procedure to send emails to more than one person. What am I doing wrong?

I keep getting an error that email.cc and email.to are read only fields.
I have tried to pass the parameter into the email = new MailMessage (mailFrom,MailTO)
however I only am able to pass 1 email address into it. I need to be able to pass 7 email addresses into the 1 message. How do I do this?



public static string NET_AuthenticatedMailSend(string mailFrom, string mailTo, string Subject, string MessageBody, string smtpHost, int smtpPort, string smtpNETAuthUser, string smtpNETAuthPassword)
            {
                //using System.Net.Mail;
                //using System.Net.Mime;
                //using System.Text.RegularExpressions;
                MailAddressCollection MailTO = mailTo;
                MailAddress MailFROM = Convert. mailFrom;
                System.Net.Mail.MailMessage email = new MailMessage();//(mailFrom, mailTo);
                email.From = MailFROM;
                email.CC = MailTO;
                email.Subject = "VERSION CONTROL (AUTORESPONDER): " + Subject;
                email.IsBodyHtml = true;
                email.Body = "VERSION CONTROL (AUTORESPONDER): \n\r" + MessageBody;
                System.Net.Mail.SmtpClient mailClient = new SmtpClient();
                System.Net.NetworkCredential basicAuthenticationInfo = new System.Net.NetworkCredential(smtpNETAuthUser, smtpNETAuthPassword);//("", "");
                mailClient.Host = smtpHost; // "exchange.liveoffice.com";
                mailClient.Port = smtpPort; // 25;
                mailClient.UseDefaultCredentials = false;
                mailClient.Credentials = basicAuthenticationInfo;

                try
                {
                    mailClient.Send(email);
                }

                catch (Exception ex)
                {
                    MessageBox.Show("Error Sending email: " + ex.ToString());
                    return ex.ToString();
                }

                return "1";

            }

AnswerRe: Trying to send email... Pin
Manas Bhardwaj18-Oct-09 9:19
professionalManas Bhardwaj18-Oct-09 9:19 
AnswerRe: Trying to send email... Pin
Not Active18-Oct-09 9:25
mentorNot Active18-Oct-09 9:25 
Questioncheck the text box string dynamically with database field Pin
Mangesh Tomar18-Oct-09 6:22
Mangesh Tomar18-Oct-09 6:22 
AnswerRe: check the text box string dynamically with database field Pin
Luc Pattyn18-Oct-09 11:11
sitebuilderLuc Pattyn18-Oct-09 11:11 
QuestionPass Excel.Application from Excel 2007 Custom Task Pane to Hosted PowerShell Pin
Uros Calakovic18-Oct-09 4:07
Uros Calakovic18-Oct-09 4:07 
QuestionSubReport in Win Form (RDLC) Pin
Abdul Rahman Hamidy18-Oct-09 3:20
Abdul Rahman Hamidy18-Oct-09 3:20 
AnswerRe: SubReport in Win Form (RDLC) Pin
Christopher Stratmann17-Apr-10 18:22
Christopher Stratmann17-Apr-10 18:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.