C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Regarding Sendinding HTML Page as Mail


Posted Date: 03 Jul 2008      Total Responses: 2

Posted By: vikram       Member Level: Bronze     Points: 1


Hello,
I have given my code below.......Here i am directly giving the html code to the body part. But now i had a html page...i want to add that page as a body part..(ie) i should not use the html code directly in the body part....please help me

MailMessage msgMail = new MailMessage();
msgMail.To = "vikramkln@gmail.com";
msgMail.From = "vikrams@resourcevalues.com";
msgMail.Subject = "Forgot Password";
msgMail.BodyFormat = MailFormat.Html;
// msgMail.Body =
msgMail.Body = "<html><body bgcolor=#FFFFCC><table width=550 border=3 bgcolor=red> <tr><td align=left><br><b>System Type: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Submit Number: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Request Number: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Reason For Change: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Requested By: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Date Request Received: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Requested Customer Delivery Date: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>FNYC/FTYO Product Code: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>FNYC/FTYO Product Description: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>FMDA Finished Goods PN: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>If NEW-Base on Existing FMDA PN: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Current Configuration: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Proposed Configuration: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>List ALL-Document to be Revised: </b></br></td><td align=left><br></br> </td></tr><tr><td align=left><br><b>Comments: </b></br></td><td align=left><br></br> </td></tr></table></body></hmtl>";
//"http://192.168.0.14/CBE/Newpwd.aspx?KEY=" + " Random Number = " + Random + " . Click the link and enter the given Random Number in to the page you are directed";

msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "vikrams@resourcevalues.com"); //set your username here
msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "malliga"); //set your password here

SmtpMail.SmtpServer = "mail.resourcevalues.com";
SmtpMail.Send(msgMail);
Response.Write("<script language='javascript'>alert('Check your Mail to get the Password');</script>");



----->This is my code......Here i am directly giving the html code to the body part. But now i had a html page...i want to add that page as a body part..(ie) i should not use the html code directly in the body part....please help me




Responses

Author: M. Irfan    04 Jul 2008Member Level: GoldRating:     Points: 2
You can use httpwebrequest then get the webresponce in string format, and this can be add to your email.


Author: shakti singh tanwar    04 Jul 2008Member Level: DiamondRating:     Points: 2
kindly refer to below artocle posted by me on spider

http://www.dotnetspider.com/resources/17962-Sending-WEB-Page-mail-body-via-C-gmail.aspx


Post Reply
You must Sign In to post a response.
Next : to insert textbox value into popup message window
Previous : ASP Controls
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it support

Contact Us    Privacy Policy    Terms Of Use