Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all

my problem is that, how to send a page to an email.
i want that send a page,
i have not send a link to page.

please accept my excuse, because i cant speak english well.
its a great problem for me, but i very exercise.
Posted

You can send it as an attachment, as Amit Kmr Sinha suggest, or just set the IsBodyHtml property of the MailMessage onbject and load the actual HTML of the page into the message itself.
There is a generic routine which sends email here: Sending an Email in C# with or without attachments: generic routine.[^]
 
Share this answer
 
Hi ,
Check this link
sending emails in asp.net[^]
Best Regards
M.Mitwalli
 
Share this answer
 
Hi,
If I am not wrong you are trying to send the page itself to the user using email. You are not trying to send a link. Right? If this is the problem then you can send the page using attachment as your asp.net page. Try visiting these links:
Sending Email with attachment in ASP.NET using SMTP Server[^]
http://wiki.asp.net/page.aspx/1740/how-to-send-email-with-attachment-from-local-machine/[^]
http://www.aspnettutorials.com/tutorials/email/email-attachment-aspnet2-vb.aspx[^]

All the best.
-AK
 
Share this answer
 
Set the following:
C#
message.BodyEncoding = System.Text.Encoding.UTF8
message.Body = htmlRenderedContent
message.IsBodyHtml = True


Pass on the page as html rendered content and set the IsBodyHtml property to true.
Following articles should help:
Email Templates[^]
Sending Email using Templates Asp.net [^]

MailMessage Class is now obsolete. Microsoft's recommended alternative: System.Net.Mail[^].


For sending email, have a look at these:
Video: Use ASP.NET to Send Email from a Web Site[^]
Sending an Email in C# with or without attachments: generic routine.[^]
 
Share this answer
 

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