.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Email Sending

Posted By: Aamrapali Tamgadge     Posted Date: September 20, 2011    Points:5   Category :ASP.Net
Hi Friends i have write the below code to send the email through my webmail server but when i write (From="myserverusername.com")

then it work fine but i need to write the txtEmail.text means the user email id how can i do more onit.here is my code

System.Web.Mail.MailMessage message = new System.Web.Mail.MailMessage();

message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "myserverusername.com");
message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "789546");


message.From = "myserverusername.com";
message.To = "aamrapali@globalinfobase.com";
message.Subject = "Message Subject";
message.Body = "Message Body";

System.Web.Mail.SmtpMail.SmtpServer = "myservername.com";
System.Web.Mail.SmtpMail.Send(message);

Responses
Author: Narayanan             
Posted Date: September 20, 2011     Points: 20   

Hi,
refer this links.you get some ideas.
http://forums.asp.net/t/971802.aspx
http://www.sitepoint.com/sending-web-email-asp-net/
http://www.4guysfromrolla.com/webtech/080801-1.shtml
http://www.codeproject.com/KB/aspnet/Email_Sending_Programme.aspx

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend