Click here to Skip to main content
15,888,155 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: get all elements under a mouse drag selection Pin
Jayapal Chandran4-Apr-10 0:55
Jayapal Chandran4-Apr-10 0:55 
GeneralRe: get all elements under a mouse drag selection Pin
Not Active4-Apr-10 5:48
mentorNot Active4-Apr-10 5:48 
GeneralRe: get all elements under a mouse drag selection Pin
Jayapal Chandran4-Apr-10 6:43
Jayapal Chandran4-Apr-10 6:43 
GeneralRe: get all elements under a mouse drag selection Pin
Not Active4-Apr-10 7:50
mentorNot Active4-Apr-10 7:50 
GeneralRe: get all elements under a mouse drag selection Pin
Jayapal Chandran5-Apr-10 7:09
Jayapal Chandran5-Apr-10 7:09 
Questionsendemail to those whose email id is in text file Pin
rajivkadam4201-Apr-10 19:42
rajivkadam4201-Apr-10 19:42 
AnswerRe: sendemail to those whose email id is in text file - not an expected reply Pin
Jayapal Chandran4-Apr-10 6:48
Jayapal Chandran4-Apr-10 6:48 
AnswerRe: sendemail to those whose email id is in text file Pin
raghvendrapanda5-Apr-10 3:20
raghvendrapanda5-Apr-10 3:20 
Try This,It worked for me


char[] splitter = { ';' };
string[] MailIdTo = txtMailTo.Text.Split(splitter);
string[] MailCc = txtMailCc.Text.Split(splitter);
string[] MailBcc = txtMailBcc.Text.Split(splitter);

MailMessage mailToSend = new MailMessage();
if (txtAuthenticationMailId.Text != "")
mailToSend.From = new MailAddress(txtAuthenticationMailId.Text);
else
mailToSend.From = new MailAddress("XYZ@gebbs.com");


for (int i = 0; i < MailIdTo.Count(); i++)
{
if (MailIdTo[i] != "")
mailToSend.To.Add(new MailAddress(MailIdTo[i]));
}
if (txtMailBcc.Text != "")
{
for (int i = 0; i < MailIdTo.Count(); i++)
{
if (MailCc[i] != "")
mailToSend.Bcc.Add(new MailAddress(MailCc[i]));
}
}
if (txtMailCc.Text != "")
{
for (int i = 0; i < MailIdTo.Count(); i++)
{
if (MailBcc[i] != "")
mailToSend.CC.Add(new MailAddress(MailBcc[i]));
}
}
if (FileUpload1.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload1.PostedFile.InputStream, FileName));
}
if (FileUpload2.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload2.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload2.PostedFile.InputStream, FileName));
}
if (FileUpload3.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload3.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload3.PostedFile.InputStream, FileName));
}
if (FileUpload4.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload4.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload4.PostedFile.InputStream, FileName));
}
if (FileUpload5.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload5.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload5.PostedFile.InputStream, FileName));
}
mailToSend.IsBodyHtml = true;
mailToSend.Body = txtBody.Text;
mailToSend.Subject = txtSubject.Text;
SmtpClient smtpMesg = new SmtpClient();
smtpMesg.Host = "smtp.emailsrvr.com";
smtpMesg.UseDefaultCredentials = false;
if (txtAuthenticationMailId.Text != "" && txtPassword.Text != "")
smtpMesg.Credentials = new System.Net.NetworkCredential(txtAuthenticationMailId.Text, txtPassword.Text);
else
smtpMesg.Credentials = new System.Net.NetworkCredential("XYZ@gebbs.com", "passw0rd");

smtpMesg.Send(mailToSend);
QuestionWeb Services -- start up notifications Pin
RedZenBird1-Apr-10 14:22
RedZenBird1-Apr-10 14:22 
Questionajax, xml results and ie error "object required" Pin
cjoki1-Apr-10 9:12
cjoki1-Apr-10 9:12 
AnswerRe: ajax, xml results and ie error "object required" [modified] Pin
daveyerwin1-Apr-10 12:44
daveyerwin1-Apr-10 12:44 
GeneralRe: ajax, xml results and ie error "object required" Pin
cjoki6-Apr-10 9:00
cjoki6-Apr-10 9:00 
QuestionFrom C++ to Web - which way to go? Pin
Caslen1-Apr-10 6:10
Caslen1-Apr-10 6:10 
AnswerRe: From C++ to Web - which way to go? Pin
Not Active1-Apr-10 6:43
mentorNot Active1-Apr-10 6:43 
GeneralRe: From C++ to Web - which way to go? Pin
Caslen1-Apr-10 8:29
Caslen1-Apr-10 8:29 
GeneralRe: From C++ to Web - which way to go? Pin
Not Active1-Apr-10 9:07
mentorNot Active1-Apr-10 9:07 
GeneralRe: From C++ to Web - which way to go? Pin
Caslen1-Apr-10 9:18
Caslen1-Apr-10 9:18 
GeneralRe: From C++ to Web - which way to go? Pin
cjoki1-Apr-10 9:30
cjoki1-Apr-10 9:30 
AnswerRe: From C++ to Web - which way to go? Pin
daveyerwin1-Apr-10 7:19
daveyerwin1-Apr-10 7:19 
GeneralRe: From C++ to Web - which way to go? Pin
Caslen1-Apr-10 8:23
Caslen1-Apr-10 8:23 
GeneralRe: From C++ to Web - which way to go? Pin
Jayapal Chandran4-Apr-10 7:06
Jayapal Chandran4-Apr-10 7:06 
AnswerRe: From C++ to Web - which way to go? Pin
Caslen6-Apr-10 23:00
Caslen6-Apr-10 23:00 
NewsThree-day India Training on Building RIAs with Ajax, jQuery and Java by Best-selling Author Marty Hall Pin
Rajesh557531-Mar-10 23:16
Rajesh557531-Mar-10 23:16 
GeneralRe: Three-day India Training on Building RIAs with Ajax, jQuery and Java by Best-selling Author Marty Hall Pin
R. Giskard Reventlov31-Mar-10 23:38
R. Giskard Reventlov31-Mar-10 23:38 
QuestionJavascript conflicts Pin
vafo31-Mar-10 2:10
vafo31-Mar-10 2:10 

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.