Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi i am using vb.net and i have a webfrom called mail.aspx i am trying to send a an email from the form but i get this error message

The "SendUsing" configuration value is invalid.

my code is as follows:

imports system.web.mail

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       'Put user code to initialize the page here
       'clear the message
       litStatus.Text = ""
   End Sub

   Private Sub butSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles butSend.Click
       Dim msgMail As New MailMessage
       'set the message properties
       msgMail.From = txtFrom.Text
       msgMail.To = txtTo.Text
       msgMail.Subject = txtSubject.Text
       msgMail.Body = txtMessage.Text
       'send the message
       SmtpMail.Send(msgMail) 'i get error here
       'clear the textboxes
       txtFrom.Text = ""
       txtTo.Text = ""
       txtSubject.Text = ""
       txtMessage.Text = ""
       'show the successs
       litStatus.Text = "<p>your mail has been sent</p>"

   End Sub

 

can someone please tell me what i need to do in order to correct this error thanks....:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...