Click here to Skip to main content
15,898,938 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: share your thought - I am hosting ASP.NET with.... Pin
Jassim Rahma27-Feb-10 20:38
Jassim Rahma27-Feb-10 20:38 
AnswerRe: share your thought - I am hosting ASP.NET with.... Pin
R. Giskard Reventlov27-Feb-10 21:40
R. Giskard Reventlov27-Feb-10 21:40 
GeneralRe: share your thought - I am hosting ASP.NET with.... Pin
Jassim Rahma28-Feb-10 18:36
Jassim Rahma28-Feb-10 18:36 
GeneralRe: share your thought - I am hosting ASP.NET with.... Pin
R. Giskard Reventlov28-Feb-10 21:26
R. Giskard Reventlov28-Feb-10 21:26 
AnswerRe: share your thought - I am hosting ASP.NET with.... Pin
stevenutt28-Feb-10 5:32
stevenutt28-Feb-10 5:32 
QuestionMessage Removed Pin
27-Feb-10 1:52
pss.srinivasan27-Feb-10 1:52 
AnswerRe: how to pass value from popup to content page Pin
Not Active27-Feb-10 2:21
mentorNot Active27-Feb-10 2:21 
QuestionEmail Sending...Help!!! Pin
DaithiBoo27-Feb-10 1:42
DaithiBoo27-Feb-10 1:42 
Hi guys Smile | :)

i am developing a website in ASP.NET using vb.net in the visual studios 2008 IDE. I am attempting to send an email from my website. i keep getting a "sending message failure" on my site. here is my code. hopefully somebody can be of assistance. much help appreciated.

ContactUs.aspx.vb:

Partial Class Default2
Inherits System.Web.UI.Page

Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click


Dim mailMessage As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()


mailMessage.From = New System.Net.Mail.MailAddress(txtFromAddress.Text.Trim())



mailMessage.To.Add(New System.Net.Mail.MailAddress(txtToAddress.Text.Trim()))

mailMessage.Subject = txtSubject.Text.Trim()

mailMessage.Body = txtBody.Text.Trim()







Dim smtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()

smtpClient.Send(mailMessage) *THIS IS WHERE THE ERROR SHOWS UP WHEN I CLICK SEND*Confused | :confused: Confused | :confused: Confused | :confused:

End Sub

Here is my web.config file code:


<system.net>
<mailSettings>
<smtp>
<network host="localhost"/>
</smtp>
</mailSettings>
</system.net>
End Class

thanks in advance!! Smile | :)

Daithi
AnswerRe: Email Sending...Help!!! Pin
Not Active27-Feb-10 2:18
mentorNot Active27-Feb-10 2:18 
AnswerRe: Email Sending...Help!!! Pin
Rutvik Dave27-Feb-10 19:39
professionalRutvik Dave27-Feb-10 19:39 
QuestionWhich version of AbacPDF.net is compatible with ASP.Net1.1 Pin
K.Safvi26-Feb-10 21:11
K.Safvi26-Feb-10 21:11 
AnswerRe: Which version of AbacPDF.net is compatible with ASP.Net1.1 Pin
R. Giskard Reventlov27-Feb-10 21:08
R. Giskard Reventlov27-Feb-10 21:08 
AnswerRe: Which version of AbacPDF.net is compatible with ASP.Net1.1 Pin
stevenutt28-Feb-10 5:37
stevenutt28-Feb-10 5:37 
QuestionHow can i get the html of the page multiple times and save as html file and send as attachment Pin
K.Safvi26-Feb-10 20:16
K.Safvi26-Feb-10 20:16 
AnswerRe: How can i get the html of the page multiple times and save as html file and send as attachment Pin
R. Giskard Reventlov27-Feb-10 21:12
R. Giskard Reventlov27-Feb-10 21:12 
QuestionQuestion of My Mind Pin
Anubhava Dimri26-Feb-10 18:18
Anubhava Dimri26-Feb-10 18:18 
AnswerRe: Question of My Mind Pin
saini arun26-Feb-10 20:56
saini arun26-Feb-10 20:56 
GeneralRe: Question of My Mind Pin
Anubhava Dimri26-Feb-10 21:10
Anubhava Dimri26-Feb-10 21:10 
Questionasp.net locale Pin
nikosmaltis26-Feb-10 10:42
nikosmaltis26-Feb-10 10:42 
AnswerRe: asp.net locale Pin
dan!sh 26-Feb-10 21:58
professional dan!sh 26-Feb-10 21:58 
QuestionOverriding Render method to get the html of the page Pin
K.Safvi26-Feb-10 7:06
K.Safvi26-Feb-10 7:06 
QuestionControls HTML viewsource is not displayed in UpdatePanel Pin
Faisal Khatri26-Feb-10 6:33
Faisal Khatri26-Feb-10 6:33 
AnswerRe: Controls HTML viewsource is not displayed in UpdatePanel Pin
T M Gray26-Feb-10 11:18
T M Gray26-Feb-10 11:18 
AnswerRe: Controls HTML viewsource is not displayed in UpdatePanel Pin
Milind R Chavan27-Feb-10 2:45
Milind R Chavan27-Feb-10 2:45 
QuestionEmbedding a PDF File in an ASP.NET Website(vb.net) Pin
DaithiBoo26-Feb-10 5:24
DaithiBoo26-Feb-10 5:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.