Sunday, 15 April 2012

Sending asp.net Page over email from windows Service Application -



Sending asp.net Page over email from windows Service Application -

following code written in asp.net web form, execute , send aspx page on email:

stringwriter sw = new stringwriter(); htmltextwriter htw = new htmltextwriter(sw); server.execute("resetpasswordemailcontents.aspx?userid=" + user.provideruserkey.tostring(), htw); homecoming mailmanager.sendemail(txtemail.text, string.empty, configurationmanager.appsettings["emailpasswordrecoverysubject"], sw.tostring());

what want send email windows service application, can not utilize "server.execute()" method in windows form application. 1 have thought how this?

it's not clear resetpasswordemailcontents.aspx does.

i'd utilize smtpclient send message. wrote post on templating spark view engine wpf app/windows service may help you.

asp.net windows

No comments:

Post a Comment