How do I send e-mail from an ASP.NET application ?
Answer / kumar saurabh
MailMessage message = new MailMessage ();
message.From = <email>;
message.To = <email>;
message.Subject = "Scheduled Power Outage";
message.Body = "Our servers will be down tonight.";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send (message);
MailMessage and SmtpMail are classes defined in the .NET Framework Class Library's System.Web.Mail namespace. Due to a security change made to ASP.NET just before it shipped, you need to set SmtpMail's SmtpServer property to "localhost" even though "localhost" is the default. In addition, you must use the IIS configuration applet to enable localhost (127.0.0.1) to relay messages through the local SMTP service.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you nest updatepanel within each other?
what is an Eventbubbling?
In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?
What is the other method, other than GET and POST, in ASP.NET?
can u create two Primary key for a table? --Sivaa
What is an assembly? Explain its parts.
What is the purpose of the following segment? If ( !IsPostBack) { sqldataAdapter1.Fill (dsusers1); DataGrid1.DataBind (); } a) To populate the DataAdapter the first time the web page id displayed. b) To populate the DataSet every time the web page is displayed. c) To populate the DataAdapter every time the web page is displayed. d)To populate the DataSet the first time the web page is displayed.
Is asp net front end or backend?
How to send auto matic emails based on scheduled tasks to several of my clients
What are the difference between function and stored procedure in .net programming language?
Explain the difference between debug.write and trace.write? When should each be used?
what is PostBack Property exactly ? when It Returns True? when it Returns False?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)