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!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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 = "mail.networks-plus.org"
SmtpMail.Send(MyMail)
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 BerneyLaw.com!"
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.WriteLine(ToText.Text)
body.Write("Sender Name: ")
body.WriteLine(Name.Text)
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 = "mail.networks-plus.org"
SmtpMail.Send(MyMail)
SmtpMail.Send(Mail)
email.Text = "Thank you for your interest"
Dim Link As New HyperLink
Link.Text = "Click here to send another email."
Link.NavigateUrl = "autoresponse.aspx"
Page.Controls.Add(Link)
email.Visible = "false"
ToText.Visible= "false"
Name.Visible= "false"
Send.Visible= "false"
NameLabel.Visible= "false"
CityLabel.Visible= "false"
City.Visible= "false"
End Sub



















PA
NJ
NY











Sign In or Register to comment.