email generation help required
-
hi im makming an asp.net web appliucation using c# and sql server 2000 at back end. when a user completes a registration form of my application, i want to snd him an email ,confirming that he has been registered and his data has been entered into the database. now can anyone please tell me how to generate email and send it to the email address as entered by the user. thanx! :)
-
hi im makming an asp.net web appliucation using c# and sql server 2000 at back end. when a user completes a registration form of my application, i want to snd him an email ,confirming that he has been registered and his data has been entered into the database. now can anyone please tell me how to generate email and send it to the email address as entered by the user. thanx! :)
Using System.Web.Mail; . . . MailMessage myMessage = new MailMessage(); myMessage.From="validfromaddress@mydomain.com"; myMessage.Subject="You have been registered!"; myMessage.To="validtoaddress@hisdomain.com"; myMessage.Body="You have been successfully registered in our system"; SmtpMail.SmtpServer="ValidSmtpMailServer"; SmtpMail.Send(myMessage); Darryl Borden Principal IT Analyst dborden@eprod.com