AutoResponse & Sending/Collecting Email Info Help! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


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??
My Code *****************************

<%@ Import Namespace= "System.IO" %>
<%@ Import Namespace="System.Web.Mail" %>
<%@ Page Language="VB" Debug="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

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

Hi, " & Name.Text & " we received your message and will answer it in a prompt manner."
Mail.BodyFormat = MailFormat.Html
Mail.From = "[email protected]"

Dim MyMail As New MailMessage
MyMail.To = ToText.Text & ";" & "[email protected]"
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 = "[email protected]"

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.