AJAX Forums

How can I send an Email in my web site using ASP.NET 2.0?

This is a discussion on How can I send an Email in my web site using ASP.NET 2.0? within the Web 2.0 forums, part of the General category; 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 ...


Go Back   AJAX Forums > General > Web 2.0

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Old 05-17-2007, 03:26 AM   #1 (permalink)
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
Old 05-17-2007, 07:56 AM   #2 (permalink)
Junior Member
 
Join Date: May 2007
Posts: 1
Rep Power: 0 Dan Goldstein is on a distinguished road
The SMTP server that you specified in the first line may need authentication. Many SMTP servers don't need authentication but only send mail for certain people, such as an ISP's server that only sends mail for its customers. You'll need to contact the owner of that SMTP server.You may have removed this from the code you posted, but you haven't given the MailMessage a From or To address.Dan
__________________
Dan Goldstein is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
i have a web based email address but I want to send mail in HTML format jblawuyi100 XHTML and CSS 0 06-08-2007 09:25 PM
How do I email an html file? bhappy_50 XHTML and CSS 2 05-30-2007 04:45 AM
Can anybody send me any link for daily hukamnama RSS/XML Feed? gurpreet s XML and XSLT 0 05-26-2007 05:01 PM
Is there a way to set up an HTML form to send the results to an XML file? John H XML and XSLT 1 05-11-2007 01:24 PM
web site in asp.net 2 and c# musarrat aziz Web 2.0 2 04-10-2007 12:53 AM


All times are GMT -4. The time now is 03:12 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5
Copyright ©2006 - 2008, AJAXwith.com