Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
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 
QuestionOpen RTF file in MS Word & WordPad Pin
Jassim Rahma18-Oct-09 3:18
Jassim Rahma18-Oct-09 3:18 
AnswerRe: Open RTF file in MS Word & WordPad Pin
0x3c018-Oct-09 3:34
0x3c018-Oct-09 3:34 
AnswerRe: Open RTF file in MS Word & WordPad Pin
DaveyM6918-Oct-09 3:35
professionalDaveyM6918-Oct-09 3:35 
AnswerRe: Open RTF file in MS Word & WordPad Pin
Luc Pattyn18-Oct-09 11:14
sitebuilderLuc Pattyn18-Oct-09 11:14 
QuestionGenerate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 3:02
AhmedMasum18-Oct-09 3:02 
AnswerRe: Generate sql select statement from another select statement Pin
Not Active18-Oct-09 3:38
mentorNot Active18-Oct-09 3:38 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 15:33
AhmedMasum18-Oct-09 15:33 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 16:14
sitebuilderLuc Pattyn18-Oct-09 16:14 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 17:09
AhmedMasum18-Oct-09 17:09 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 18:04
sitebuilderLuc Pattyn18-Oct-09 18:04 

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.