Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do I send e-mail from an ASP.NET application ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define secured sockets layer.

902


What is distributed system in asp.net?

987


Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?

1217


What is work flow gen? how can it will work with .Net?

2989


Explain State management in asp.net

1029


Describe briefly what is the role of IIS on an ASP.NET application? What does it for the same application?

1029


What is the request flow used for asp.net mvc framework? : asp.net mvc

931


What are the differences between code behind and code inline?

1012


What is meant by server side scripting?

899


How does the service stream content?

978


In the Repeater control which way you can edit?

1039


What is the usie of activex control in .net?

958


Explain how is a property designated as read-only?

963


What are the layouts of ASP.NET Pages?

1014


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

2298