View Single Post

Old 05-17-2007, 04:26 AM   #1 (permalink)
mahdi_F1_robot
Junior Member
 
Join Date: May 2007
Posts: 1
Rep Power: 0 mahdi_F1_robot is on a distinguished road
How can I send an Email in my web site using ASP.NET 2.0?

I have written a code in asp.net 2.0 and tested that in a web site to send emils to users, but it fails. The error message is:Not Local host yahoo.com, not gateway.How can I solve this problem. Do I need Authentication? If so, how shaould I do it? The Code isim objSMTP As New SmtpClient("mail.mydomian.com")Dim mailSubject As String = txtSubject.TextDim mailBody As String = txtBody.TextDim objMailMsg As New MailMessage("support@mydomain.com", txtTo.Text)objMailMsg.Subject = mailSubjectobjMailMsg.Body = mailBodyobjSMTP.Send(objMailMsg)objMailMsg.Dispose ()
__________________
mahdi_F1_robot is offline   Reply With Quote