Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
actually i wanted html page templates which should be used in smtp to send mail in asp.net

suppose i have created a html page with some pictures and paragraph . and i want to change the some text of that template :

For example :

Dear[Username]...

....

here in the html page username should be changed to required field

and that page should be sent via smtp in asp.net

Thanks
Posted
Updated 2-May-12 20:08pm
v4
Comments
sureshchowdary05 4-Jul-12 6:40am    
can anyone show how to send the mail that is xml based template in asp.net c#...plzzzzzzzzz
thanks in advance

Please refer following threads:

This article briefs you about sending mail using SMTP in HTML Format, which takes the default SMTP settings from web.config file
(ASP.NET)Sending mail using SMTP in HTML format using IP settings in web.config file[^]

Here's some code that will help you construct HTML e-mail from a variety of mail objects available in ASP.
send e-mail in HTML format[^]

This article looks at the more advanced email-related options:
HTML-Formatted Emails, Attachments, and Gracefully Handling SMTP Exceptions[^]

Code snippet on sending email via ASP.NET in html format[^]
Sending Email Both in HTML and Plain Text[^]

For more have a look here:
Complete FAQ for the System.Net.Mail namespace found in .NET[^]
Email Templates[^]
 
Share this answer
 
v3
Comments
sureshchowdary05 4-Jul-12 6:37am    
i want the complete code of sending mail using xml based template using asp.net c#...plz send it to me...urjent
Hi,

You need to remember two things
1) you need to upload all your images on some image hosting server (those who provide link for your image). this link should be placed in your html template for image.

2) you need to send your email as
VB
mailMsg.BodyFormat = MailFormat.Html
settings.

and all other email sending code should be similar.

-Amit
 
Share this answer
 
Comments
sandeep nagabhairava 3-May-12 3:07am    
thanks for your valuable information...
Kolli Hari Chowdary 5-May-12 16:43pm    
plz Can u Show any Example
AmitGajjar 6-May-12 23:55pm    
which example you want, do you want an example to send an email ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900