I have a script that I really like to use for a contact email forms, but it has that mail server configuration info hard coded. I would like it better if it ran off of the web.config mailsettings, but I know nothing about VB. Can anyone help me out with directions on how to change it to run off the web.config.
Thanks
<script runat="server">
Protected Sub SubmitForm_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Not Page.IsValid Then Exit Sub
Dim SendResultsTo As String = "######"
Dim smtpMailServer As String = "######"
Dim smtpUsername As String = "######"
Dim smtpPassword As String = "######"
Dim MailSubject As String = "Form Results"
Try
Dim txtQ As TextBox = Me.FormContent.FindControl("TextBoxQ")
...
Go to the complete details ...