Click here to Skip to main content
16,012,316 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,here am developing a web application and in that am saving some data into the database. The data what am saving i want mail that to my authority, give me the solutions for this friends.
Posted

This[^] may help.
 
Share this answer
 
try these results
Sending mail
 
Share this answer
 
v2
C# code will be:

MailMessage ms = new MailMessage("from@xyz.com", "to@xyz.com", "Your subject",
"your mail message");
SmtpClient sc = new SmtpClient("localhost", 25);
sc.Send(ms);


Do some modification in web.config file:

<system.net>
<mailSettings>
<smtp from="from@xyz.com">
<network host="localhost" password="password@123"
userName="from@xyz.com" />
</smtp>
</mailSettings>
</system.net>

Try this it'll work..
 
Share this answer
 
Comments
Richard MacCutchan 8-Dec-11 5:25am    
Use <pre> tags around code.

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