| | |
How to compose an html complex email?
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2005
Posts: 5
Reputation:
Solved Threads: 0
hey,
if you are sending emails using ASP.NET, then you need not worry about anything extra..just use the System.Web.Mail namespace, every setting is present there..for example look at this code below:
string MailServer=""; //Your mail server name
System.Web.Mail.MailMessage SendMail = new System.Web.Mail.MailMessage(); //create a new mail message SendMail.BodyEncoding=System.Text.Encoding.UTF8; //set encoding
SendMail.BodyFormat=System.Web.Mail.MailFormat.Html; //set Format..There are HTML and Text formats available
SendMail.To=mailTo; //to
SendMail.From=mailFrom; //from
SendMail.Subject=subject;//subject
SendMail.Body=mailBody; //mail Body..The complete HTML string of page
SendMail.Cc = mailCC;//CC
SendMail.Bcc = mailBCC;//BCC
System.Web.Mail.SmtpMail.SmtpServer=MailServer;//set mail server
System.Web.Mail.SmtpMail.Send(SendMail); //send email
Hope this helps
if you are sending emails using ASP.NET, then you need not worry about anything extra..just use the System.Web.Mail namespace, every setting is present there..for example look at this code below:
string MailServer=""; //Your mail server name
System.Web.Mail.MailMessage SendMail = new System.Web.Mail.MailMessage(); //create a new mail message SendMail.BodyEncoding=System.Text.Encoding.UTF8; //set encoding
SendMail.BodyFormat=System.Web.Mail.MailFormat.Html; //set Format..There are HTML and Text formats available
SendMail.To=mailTo; //to
SendMail.From=mailFrom; //from
SendMail.Subject=subject;//subject
SendMail.Body=mailBody; //mail Body..The complete HTML string of page
SendMail.Cc = mailCC;//CC
SendMail.Bcc = mailBCC;//BCC
System.Web.Mail.SmtpMail.SmtpServer=MailServer;//set mail server
System.Web.Mail.SmtpMail.Send(SendMail); //send email
Hope this helps
![]() |
Similar Threads
- Exclamation points at odd places in php email. (PHP)
- One template in (*)HTML required (Web Development Job Offers)
- Sending HTML/Plain text Emails (PHP)
- ASP: Sending a HTML form to an email address (ASP)
- Return Form data layout (email) (Site Layout and Usability)
- Automatic email creation in cpanel ----PHP (PHP)
- HTML mail subscriiption error (PHP)
Other Threads in the ASP.NET Forum
- Previous Thread: Help with Roles Stored in SQL database
- Next Thread: What's the best SEO blog software?
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances asp asp.net beginner box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class compatible complex confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datalist deadlock deployment development dgv dialog dropdown dropdownmenu dynamic edit embeddingactivexcontrol feedback fileuploader findcontrol flash flv folder form forms grid gridview homeedition hosting iis image index javascript jquery languages list maps menu mobile mssql multistepregistration nameisnotdeclared novell objects order problem profile ratings refer relationaldatabases response.redirect rotatepage search security serializesmo.table sessionvariables silverlight sql ssl tracking treeview typeof update validatedate validation vb.net virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopment wizard xml





