C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 212 Page Views: 

How do you send email from c#?



Posted By: Avi Date: 14 October 2010 02:50:31 AM
 Answer:

SmtpClient smtp = new SmtpClient(); smtp.Host = “10.0.0.1”; MailMessage mail = new MailMessage(); mail.From = “a@b.com”; mail.To=”b@c.com”; smtp.Send(mail);


Posted By: avibtech


Date: 14 October 2010 02:50:31 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image qaKCAp
Related Questions
C# : How do you use ThreadPool?

How do you use ThreadPool?

Use QueueUserWorkItem to queue new task
Category: C# Date: 10/13/2010 8:50:47 PM
C# : Write code to select odd numbers from List<int> list using LINQ

Write code to select odd numbers from List list using LINQ

from l in list where l % 2 = 1 select l;
Category: C# Date: 10/13/2010 8:29:31 PM
C# : How do you subscribe to the event using Lambda expression:

How do you subscribe to the event using Lambda expression:

this.Click +=(s,e) => { /*code here*/; };
Category: C# Date: 10/13/2010 7:39:14 PM
C# : What does the as operator do?

What does the as operator do?

It perform conversion between compatible reference types
Category: C# Date: 10/13/2010 7:35:14 PM
C# : How do you define constraints on generic type parameters?

How do you define constraints on generic type parameters?

class Name<T> Where T: IConvertible {}
Category: C# Date: 10/13/2010 7:16:32 PM