Click here to Skip to main content
15,898,538 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Decision in HTML Page Pin
daveyerwin5-Apr-10 8:26
daveyerwin5-Apr-10 8:26 
GeneralRe: Decision in HTML Page Pin
Dalek Dave5-Apr-10 8:42
professionalDalek Dave5-Apr-10 8:42 
QuestionJava - Eclipse JEE 3.4 and JBoss 5 (Missing classpath entry) Pin
Ram Bonala5-Apr-10 1:54
Ram Bonala5-Apr-10 1:54 
QuestionExternal Javascript Generates "Object Expected" Error in Internet Explorer Pin
Skippums4-Apr-10 15:24
Skippums4-Apr-10 15:24 
AnswerRe: External Javascript Generates "Object Expected" Error in Internet Explorer Pin
R. Giskard Reventlov4-Apr-10 21:06
R. Giskard Reventlov4-Apr-10 21:06 
AnswerRe: External Javascript Generates "Object Expected" Error in Internet Explorer Pin
Alaric_5-Apr-10 4:13
professionalAlaric_5-Apr-10 4:13 
Questionget all elements under a mouse drag selection [modified] Pin
Jayapal Chandran1-Apr-10 19:45
Jayapal Chandran1-Apr-10 19:45 
AnswerRe: get all elements under a mouse drag selection Pin
daveyerwin2-Apr-10 1:20
daveyerwin2-Apr-10 1:20 
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 

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.