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


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Send mail........


Posted Date: 05 Jul 2008      Total Responses: 1

Posted By: sathya       Member Level: Gold     Points: 1



hi,

i used send mail concepts;
i am not used textbox and any other control,i used only page load event;

i wants messsage(part);
for example:
To:emailid
From:fromemailid
message.body:Filepath = "C:\\sathya.txt"
FileIO.FileSystem.FileExists(Filepath)
message.Body = FileIO.FileSystem.ReadAllText(Filepath)

above code all work well:
but my problem;i want pass username,password,with this message.body to our mail;

so how to pass

understand my problem


Regards
sathya





Responses

Author: mahalakshmi    05 Jul 2008Member Level: GoldRating:     Points: 6

see the following code ,inside the body v can add text or table design,

msg = "<table><tr><td align='left' style='width:30%' class='texts'><b> Name</b> </td><td align='left' style='width:50%' class='texts'>";
msg += na;
msg += "</td></tr>";
msg += "<tr><td align='left' style='width:30%' class='texts'><b> Password</b> </td><td align='left' style='width:50%' class='texts' >";
msg += pwdd;
msg += "</td></tr>";
msg += "</table>";

MailMessage mailmsg = new MailMessage();
mailmsg.From = dgdfg;
mailmsg.To = "dfgfgfg";
mailmsg.Subject = dfgsdfg;
mailmsg.BodyFormat = MailFormat.Html;
mailmsg.Body = msg;
SmtpMail.Send(mailmsg);

try this.



Post Reply
You must Sign In to post a response.
Next : To sujit kumar
Previous : Open A Web page in to a windows form
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use