Click here to Skip to main content
15,793,547 members
Home / Discussions / C#
   

C#

 
GeneralRe: Save everything but the blob to DB Pin
Not Active18-Oct-09 11:18
mentorNot Active18-Oct-09 11:18 
QuestionBindingContext question Pin
HarrisonBrock18-Oct-09 8:41
HarrisonBrock18-Oct-09 8:41 
AnswerRe: BindingContext question Pin
dataminers18-Oct-09 12:16
dataminers18-Oct-09 12:16 
GeneralRe: BindingContext question Pin
HarrisonBrock18-Oct-09 13:42
HarrisonBrock18-Oct-09 13:42 
QuestionListboxes etc. on top of video Pin
lvq68418-Oct-09 8:29
lvq68418-Oct-09 8:29 
AnswerRe: Listboxes etc. on top of video Pin
Not Active18-Oct-09 10:26
mentorNot Active18-Oct-09 10:26 
GeneralRe: Listboxes etc. on top of video Pin
lvq68418-Oct-09 23:04
lvq68418-Oct-09 23:04 
QuestionTrying to send email... Pin
JollyMansArt18-Oct-09 7:50
JollyMansArt18-Oct-09 7: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 10:19
professionalManas Bhardwaj18-Oct-09 10:19 
AnswerRe: Trying to send email... Pin
Not Active18-Oct-09 10:25
mentorNot Active18-Oct-09 10:25 
Questioncheck the text box string dynamically with database field Pin
Mangesh Tomar18-Oct-09 7:22
Mangesh Tomar18-Oct-09 7:22 
AnswerRe: check the text box string dynamically with database field Pin
Luc Pattyn18-Oct-09 12:11
sitebuilderLuc Pattyn18-Oct-09 12:11 
QuestionPass Excel.Application from Excel 2007 Custom Task Pane to Hosted PowerShell Pin
Uros Calakovic18-Oct-09 5:07
Uros Calakovic18-Oct-09 5:07 
QuestionSubReport in Win Form (RDLC) Pin
Abdul Rahman Hamidy18-Oct-09 4:20
Abdul Rahman Hamidy18-Oct-09 4:20 
AnswerRe: SubReport in Win Form (RDLC) Pin
Christopher Stratmann17-Apr-10 19:22
Christopher Stratmann17-Apr-10 19:22 
QuestionOpen RTF file in MS Word & WordPad Pin
Jassim Rahma18-Oct-09 4:18
Jassim Rahma18-Oct-09 4:18 
AnswerRe: Open RTF file in MS Word & WordPad Pin
0x3c018-Oct-09 4:34
0x3c018-Oct-09 4:34 
AnswerRe: Open RTF file in MS Word & WordPad Pin
DaveyM6918-Oct-09 4:35
professionalDaveyM6918-Oct-09 4:35 
AnswerRe: Open RTF file in MS Word & WordPad Pin
Luc Pattyn18-Oct-09 12:14
sitebuilderLuc Pattyn18-Oct-09 12:14 
QuestionGenerate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 4:02
AhmedMasum18-Oct-09 4:02 
AnswerRe: Generate sql select statement from another select statement Pin
Not Active18-Oct-09 4:38
mentorNot Active18-Oct-09 4:38 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 16:33
AhmedMasum18-Oct-09 16:33 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 17:14
sitebuilderLuc Pattyn18-Oct-09 17:14 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 18:09
AhmedMasum18-Oct-09 18:09 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 19:04
sitebuilderLuc Pattyn18-Oct-09 19: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.