C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

send mail


Posted Date: 05 Jul 2008      Posted By: sathya      Member Level: Gold     Points: 1   Responses: 1





hai,

small suggestions:

i used send mail concepts;
i am not used textbox and any other control,i used only page load event;
i put From address and To address,i will pass through session in code begind ;i wants messsage(part) how to write message in code begind;
for example:
To:Session("To")email
From:default i will set
Message:"thank u"(already i wrote")
but i want

Message:more than 10 lines;so how to write a message"

understand my problem????..

Regards
suji





Responses

Author: Deepa    05 Jul 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 6

write matter in notepad save it in folder where ur project is...
this is my code using in my project i hope this my help u



string FilePath;
// FilePath = "C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\WebSites\\EmailTest\\Test.txt";
FilePath = "C:\\Inetpub\\wwwroot\\Aimtechno\\Test.txt";
File.Exists(FilePath);
//textBoxContents.Text = File.ReadAllText(FilePath);
MyMessage.Body = File.ReadAllText(FilePath) + (System.Environment.NewLine.ToString()) + "Employee Number : '" + EmpNum.Text + "' " + (System.Environment.NewLine.ToString()) + "Your Password : '" + ds.Tables[0].Rows[0]["Password"].ToString() + "'" + (System.Environment.NewLine.ToString()) + (System.Environment.NewLine.ToString()) + "ATGS Team";



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : How to send a mail to all emailIDs in user table except one
Previous : keypress event in c#
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use