sending email
-
Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help!
System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28
Thanks in Advance -
Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help!
System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28
Thanks in AdvanceMost anything you would want to learn about System.Net.Mail[^]
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
"Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School) -
Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help!
System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28
Thanks in AdvanceFirst you have to make sure the SMTP service installed on your PC? And you might post your code here... << >>
-
First you have to make sure the SMTP service installed on your PC? And you might post your code here... << >>
SMTP Service is running.
ailMessage msg = new MailMessage("sample@lookman","kapat_saltcode@yahoo.com"); msg.Body = "Did u receive this, if u did don't reply, just testing"; msg.Subject = "TESTING"; try { SmtpClient sc = new SmtpClient("lookman"); sc.Send(msg); } catch (SmtpException smtpex) { Label1.Text = smtpex.Message.ToString(); } catch (Exception ex) { Label1.Text = ex.Message.ToString(); }
-
SMTP Service is running.
ailMessage msg = new MailMessage("sample@lookman","kapat_saltcode@yahoo.com"); msg.Body = "Did u receive this, if u did don't reply, just testing"; msg.Subject = "TESTING"; try { SmtpClient sc = new SmtpClient("lookman"); sc.Send(msg); } catch (SmtpException smtpex) { Label1.Text = smtpex.Message.ToString(); } catch (Exception ex) { Label1.Text = ex.Message.ToString(); }
//create the mail message
MailMessage mail = new MailMessage();//set the addresses
mail.From = new MailAddress("me@mycompany.com");
mail.To.Add("you@yourcompany.com");//set the content
mail.Subject = "This is an email";
mail.Body = "this is a sample body with html in it. This is bold This is blue";
mail.IsBodyHtml = true;//send the message
SmtpClient smtp = new SmtpClient("127.0.0.1");
smtp.Send(mail);That is from the link I provided. Does that shed any light on the subject?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
"Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School) -
Hi Guy's, Please can you explain, how I can to configure localhost smtp server to send mail from my web application? I tried, but i get this error. Please help!
System.Net.Mail.SmtpException was caught Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\motoman\Default.aspx.cs:line 28
Thanks in Advance