Howdy, Stranger!




AutoResponse & Sending/Collecting Email Info Help!

timob12timob12 Posts: 1Member
Hi new to .NET and I almost have this working but I'm doing a few things wrong. *Its a autoresponse and form collection (by the way*).

1) How do I collect information from a ??
I'm trying to collect information from the City List but I am not collecting it for some reason.

2) I am getting confused with how to send the information. The user should receive a Hi, " & Name.Text & " we received your message and will answer it in a prompt manner. And I should be getting the information that was input by the user.

As I have it now I am getting the information from the user but the user is not getting the automated response. I have been fiddling with this for awhileam now am just confused. Could someone let me know where I'm going wrong. I pretty sure it something basic. I think I'm doing something wrong with my

SmtpMail.SmtpServer = ""
SmtpMail.Send(Mail)........I think this is wrong??

<%@ Import Namespace= "System.IO" %>
<%@ Import Namespace="System.Web.Mail" %>

Sub Send_Click(Sender As Object, e As EventArgs)
Dim Mail As New MailMessage
Mail.To = ToText.Text & ";" & ""
Mail.Subject = "Hello from!"
Mail.Body = "

Mail.BodyFormat = MailFormat.Html
Mail.From = ""

Dim MyMail As New MailMessage
MyMail.To = ToText.Text & ";" & ""
MyMail.Subject = "User posted"
Dim body As StringWriter = New StringWriter()
body.Write("Sender Email: ")
body.Write("Sender Name: ")
body.Write("Sender Selection: ")
' body.WriteLine(City.Items[City.SelectedIndex].Text)
MyMail.Body = body.ToString()
MyMail.BodyFormat = MailFormat.Text
MyMail.From = ""

SmtpMail.SmtpServer = ""
email.Text = "Thank you for your interest"
Dim Link As New HyperLink
Link.Text = "Click here to send another email."
Link.NavigateUrl = "autoresponse.aspx"
email.Visible = "false"
ToText.Visible= "false"
Name.Visible= "false"
Send.Visible= "false"
NameLabel.Visible= "false"
CityLabel.Visible= "false"
City.Visible= "false"
End Sub


Sign In or Register to comment.