<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'AutoResponse &amp; Sending/Collecting Email Info Help!' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'AutoResponse &amp; Sending/Collecting Email Info Help!' posted on the 'ASP.NET' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 04:27:20 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 04:27:20 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>AutoResponse &amp; Sending/Collecting Email Info Help!</title>
      <link>http://www.programmersheaven.com/mb/ASPNET/124079/124079/autoresponse--sendingcollecting-email-info-help/</link>
      <description>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*). &lt;br /&gt;
&lt;br /&gt;
1) How do I collect information from a &amp;lt;asp:dropdownlist/&amp;gt;?? &lt;br /&gt;
   I'm trying to collect information from the City List but I am not collecting it for some reason. &lt;br /&gt;
&lt;br /&gt;
2) I am getting confused with how to send the information. The user should receive a Hi, " &amp;amp; Name.Text &amp;amp; " 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. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
SmtpMail.SmtpServer = "mail.networks-plus.org" &lt;br /&gt;
             SmtpMail.Send(MyMail) &lt;br /&gt;
         SmtpMail.Send(Mail)........I think this is wrong?? &lt;br /&gt;
My Code ***************************** &lt;br /&gt;
&lt;br /&gt;
&amp;lt;%@ Import Namespace= "System.IO" %&amp;gt; &lt;br /&gt;
&amp;lt;%@ Import Namespace="System.Web.Mail" %&amp;gt; &lt;br /&gt;
&amp;lt;%@ Page Language="VB" Debug="true" %&amp;gt; &lt;br /&gt;
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&amp;gt; &lt;br /&gt;
&amp;lt;HTML&amp;gt; &lt;br /&gt;
    &amp;lt;HEAD&amp;gt; &lt;br /&gt;
        &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt; &lt;br /&gt;
        &amp;lt;script runat="server"&amp;gt; &lt;br /&gt;
        Sub Send_Click(Sender As Object, e As EventArgs) &lt;br /&gt;
            Dim Mail As New MailMessage &lt;br /&gt;
            Mail.To = ToText.Text &amp;amp; ";" &amp;amp; "timob12@networksplus.org" &lt;br /&gt;
            Mail.Subject = "Hello from BerneyLaw.com!" &lt;br /&gt;
            Mail.Body = "&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;Hi, " &amp;amp; Name.Text &amp;amp; " we received your message and will answer it in a prompt manner.&amp;lt;h1&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;" &lt;br /&gt;
            Mail.BodyFormat = MailFormat.Html &lt;br /&gt;
            Mail.From = "timob12@networks-plus.org" &lt;br /&gt;
             &lt;br /&gt;
           &lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
             &lt;br /&gt;
                Dim MyMail As New MailMessage &lt;br /&gt;
                    MyMail.To = ToText.Text &amp;amp; ";" &amp;amp; "timob12@networks-plus.org" &lt;br /&gt;
                    MyMail.Subject = "User posted" &lt;br /&gt;
                    Dim body As StringWriter = New StringWriter() &lt;br /&gt;
                    body.Write("Sender Email: ") &lt;br /&gt;
                    body.WriteLine(ToText.Text) &lt;br /&gt;
                    body.Write("Sender Name: ") &lt;br /&gt;
                    body.WriteLine(Name.Text) &lt;br /&gt;
                    body.Write("Sender Selection: ") &lt;br /&gt;
             '      body.WriteLine(City.Items[City.SelectedIndex].Text
) &lt;br /&gt;
                    MyMail.Body = body.ToString() &lt;br /&gt;
                    MyMail.BodyFormat = MailFormat.Text &lt;br /&gt;
                    MyMail.From = "timob12@networks-plus.org" &lt;br /&gt;
&lt;br /&gt;
             SmtpMail.SmtpServer = "mail.networks-plus.org" &lt;br /&gt;
             SmtpMail.Send(MyMail) &lt;br /&gt;
             SmtpMail.Send(Mail) &lt;br /&gt;
          email.Text = "Thank you for your interest" &lt;br /&gt;
          Dim Link As New HyperLink &lt;br /&gt;
          Link.Text = "Click here to send another email." &lt;br /&gt;
          Link.NavigateUrl = "autoresponse.aspx" &lt;br /&gt;
          Page.Controls.Add(Link) &lt;br /&gt;
          email.Visible = "false" &lt;br /&gt;
          ToText.Visible= "false" &lt;br /&gt;
          Name.Visible= "false" &lt;br /&gt;
          Send.Visible= "false" &lt;br /&gt;
          NameLabel.Visible= "false" &lt;br /&gt;
          CityLabel.Visible= "false" &lt;br /&gt;
          City.Visible= "false" &lt;br /&gt;
        End Sub &lt;br /&gt;
        &amp;lt;/script&amp;gt; &lt;br /&gt;
        &amp;lt;meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0"&amp;gt; &lt;br /&gt;
        &amp;lt;meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"&amp;gt; &lt;br /&gt;
    &amp;lt;/HEAD&amp;gt; &lt;br /&gt;
    &amp;lt;body&amp;gt; &lt;br /&gt;
        &amp;lt;FORM runat="server"&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;asp:label id="email" text="Please enter your Email Address" runat="server" /&amp;gt; &lt;br /&gt;
            &amp;lt;asp:textbox id="ToText"  Width="200" runat="server" /&amp;gt; &lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
            &amp;lt;asp:label id="NameLabel" text="Please enter your Name" runat="server" /&amp;gt; &lt;br /&gt;
            &amp;lt;asp:textbox  id="Name" Width="120" runat="server"  /&amp;gt; &lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
            &amp;lt;asp:label id="CityLabel" text="City" runat="server" /&amp;gt; &lt;br /&gt;
             &lt;br /&gt;
            &amp;lt;asp:dropdownlist id="City" runat=server&amp;gt; &lt;br /&gt;
                     &amp;lt;asp:listitem&amp;gt; PA &amp;lt;/asp:listitem&amp;gt; &lt;br /&gt;
                      &amp;lt;asp:listitem&amp;gt; NJ &amp;lt;/asp:listitem&amp;gt; &lt;br /&gt;
                       &amp;lt;asp:listitem&amp;gt; NY &amp;lt;/asp:listitem&amp;gt; &lt;br /&gt;
                    &amp;lt;/asp:dropdownlist&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
             &lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
            &amp;lt;asp:button id="Send" text="Send" OnClick="Send_Click" runat="server" /&amp;gt;&amp;lt;/P&amp;gt; &lt;br /&gt;
        &amp;lt;/FORM&amp;gt; &lt;br /&gt;
    &amp;lt;/body&amp;gt; &lt;br /&gt;
&amp;lt;/HTML&amp;gt; &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ASPNET/124079/124079/autoresponse--sendingcollecting-email-info-help/</guid>
      <pubDate>Thu, 27 Jun 2002 20:21:08 -0700</pubDate>
      <category>ASP.NET</category>
    </item>
  </channel>
</rss>