Home
|
Articles
|
Namespace
|
Interview Questions
|
Tools
|
Jobs
|
Projects
|
Community
»Dotnet Ads
»Message Boards
Message Boards
Dotnet Books
»Member Details
Register
Login
LogOut
Submit Code
Submit Jobs
Submit Projects
»Competition
Community
Winners
Prizes
Write For Us
Members
»Other Resources
Links
Dotnet Resources
Forums
»
C# .NET »
dotnet
want to know how we send emails dynamically.
Creating Emails Dynamically
using System.Web.Mail string to = jdoe@abc.com; string from = support@abc.com; string subject = "This is the Subject of your email"; string msg = "Text of your email"; Declare a new mailmessage object System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage(); mail.To = to; mail.From = from; mail.Subject = subject; mail.BodyFormat = MailFormat.Html; mail.Body = msg; SmtpMail.Send(mail); mail = null; If you need any additional information check out System.Web.Mail in the MSDN.
© 2008 dotnetwatch.com --
Privacy policy
Website Design
&
Internet Marketing
by Shivam