T
tfsmag
It acts like it sends, but nothing ever shows up... anything you guys
can find glaringly wrong here?
Thanks in advance,
Jeff
Here is the code that is supposed to send the mail.
-------------------------------------
private void submit_cf_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
string To="(e-mail address removed)";
string From=youremail.Text;
string Subject=yoursubject.SelectedValue.ToString();
string Body=yourcomments.Text;
string username="(e-mail address removed)";
string password="*******";
MailMessage mail = new MailMessage();
mail.To = To;
mail.From = From;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
1);
mail.Fields.Add("http://schemas.micro
soft.com/cdo/configuration/sendusername", username);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
password);
mail.Subject = Subject;
mail.Body = Body;
SmtpMail.SmtpServer = "mail.twentyfoursevenmag.com"; //your real
server goes here
SmtpMail.Send(mail);
}
----------------------------------------
Here is the aspx code that sends it
----------------------------------------
<asp:TextBox CssClass="textboxes" id="yourname" runat="server"
/>Name<br>
<asp:TextBox CssClass="textboxes" id="youremail" runat="server"
/>Email<br>
Subject<br>
<asp
ropDownList class="textboxes" id="yoursubject"
runat="server">
<asp:ListItem Value="Misc. Inquiry From TFSmag Contact
Form">Misc.</asp:ListItem>
<asp:ListItem Value="I love TFSmag so much it hurts">I love
you</asp:ListItem>
<asp:ListItem Value="I hope TFSmag gets hit by a dump truck">I
hate you</asp:ListItem>
<asp:ListItem Value="Dear TFSmag, please link my site">Link
Exchanges</asp:ListItem>
<asp:ListItem Value="Dear TFSmag, i wanna give you
money">Advertising</asp:ListItem>
</asp
ropDownList>
<br>
<asp:TextBox CssClass="textboxes" id="yourcomments"
TextMode="MultiLine" runat="server" Columns="25"
Rows="6">comments
</asp:TextBox><br>
<asp:ImageButton ImageUrl="images/submitbutton.png" ID="submit_cf"
Runat="server" />
-------------------------------------
can find glaringly wrong here?
Thanks in advance,
Jeff
Here is the code that is supposed to send the mail.
-------------------------------------
private void submit_cf_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
string To="(e-mail address removed)";
string From=youremail.Text;
string Subject=yoursubject.SelectedValue.ToString();
string Body=yourcomments.Text;
string username="(e-mail address removed)";
string password="*******";
MailMessage mail = new MailMessage();
mail.To = To;
mail.From = From;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
1);
mail.Fields.Add("http://schemas.micro
soft.com/cdo/configuration/sendusername", username);
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
password);
mail.Subject = Subject;
mail.Body = Body;
SmtpMail.SmtpServer = "mail.twentyfoursevenmag.com"; //your real
server goes here
SmtpMail.Send(mail);
}
----------------------------------------
Here is the aspx code that sends it
----------------------------------------
<asp:TextBox CssClass="textboxes" id="yourname" runat="server"
/>Name<br>
<asp:TextBox CssClass="textboxes" id="youremail" runat="server"
/>Email<br>
Subject<br>
<asp
runat="server">
<asp:ListItem Value="Misc. Inquiry From TFSmag Contact
Form">Misc.</asp:ListItem>
<asp:ListItem Value="I love TFSmag so much it hurts">I love
you</asp:ListItem>
<asp:ListItem Value="I hope TFSmag gets hit by a dump truck">I
hate you</asp:ListItem>
<asp:ListItem Value="Dear TFSmag, please link my site">Link
Exchanges</asp:ListItem>
<asp:ListItem Value="Dear TFSmag, i wanna give you
money">Advertising</asp:ListItem>
</asp
<br>
<asp:TextBox CssClass="textboxes" id="yourcomments"
TextMode="MultiLine" runat="server" Columns="25"
Rows="6">comments
</asp:TextBox><br>
<asp:ImageButton ImageUrl="images/submitbutton.png" ID="submit_cf"
Runat="server" />
-------------------------------------