Click here to Skip to main content
15,902,189 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync18-Nov-07 15:09
Michael Sync18-Nov-07 15:09 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 15:23
nickabradley18-Nov-07 15:23 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync18-Nov-07 15:36
Michael Sync18-Nov-07 15:36 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 16:07
nickabradley18-Nov-07 16:07 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync18-Nov-07 16:27
Michael Sync18-Nov-07 16:27 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 16:33
nickabradley18-Nov-07 16:33 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Christian Graus18-Nov-07 17:59
protectorChristian Graus18-Nov-07 17:59 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley19-Nov-07 15:48
nickabradley19-Nov-07 15:48 
I got the code to run (no errors and the page redirects after hitting submit) yet I do not get a email; any idea why?


--- feedback.aspx.cs ---
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
SmtpClient smtpClient = new SmtpClient("mail.talligewi62.org");
MailMessage message = new MailMessage();

try
{
MailAddress fromAddress = new MailAddress(email.Text, name.Text);
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("nickbradley@talligewi62.org");
message.Subject = "Talligewi 62 Website Feedback";
message.Bcc.Add(new MailAddress("banquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = lodge.Text + " " + Remarks.Text + " " + Status.Text;
smtpClient.Send(message);
}
catch (Exception ex)
{
}
Response.Redirect("http://www.talligewi62.org");
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}

--- End of File ---

Thanks for your help!

GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync19-Nov-07 15:55
Michael Sync19-Nov-07 15:55 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley19-Nov-07 16:12
nickabradley19-Nov-07 16:12 
QuestionProblem in sending e-mails [modified] Pin
qmzph18-Nov-07 5:13
qmzph18-Nov-07 5:13 
AnswerRe: Problem in sending e-mails Pin
DigiOz Multimedia18-Nov-07 5:56
DigiOz Multimedia18-Nov-07 5:56 
QuestionProblem uploading files Pin
Zoltan Aszalos18-Nov-07 4:30
Zoltan Aszalos18-Nov-07 4:30 
AnswerRe: Problem uploading files Pin
Hesham Amin18-Nov-07 12:21
Hesham Amin18-Nov-07 12:21 
GeneralRe: Problem uploading files Pin
Zoltan Aszalos18-Nov-07 20:34
Zoltan Aszalos18-Nov-07 20:34 
GeneralRe: Problem uploading files Pin
Hesham Amin21-Nov-07 10:44
Hesham Amin21-Nov-07 10:44 
QuestionSeparate Projects for BLL & DAL Pin
Montu7618-Nov-07 2:37
Montu7618-Nov-07 2:37 
AnswerRe: Separate Projects for BLL & DAL Pin
Colin Angus Mackay18-Nov-07 2:55
Colin Angus Mackay18-Nov-07 2:55 
AnswerRe: Separate Projects for BLL & DAL Pin
pmarfleet18-Nov-07 8:01
pmarfleet18-Nov-07 8:01 
Questionget list of user Pin
ptvce17-Nov-07 20:15
ptvce17-Nov-07 20:15 
QuestionNetwork Traffic and Activity monitoring via ASP.Net Pin
MeNew17-Nov-07 17:12
MeNew17-Nov-07 17:12 
AnswerRe: Network Traffic and Activity monitoring via ASP.Net Pin
Michael Sync17-Nov-07 18:45
Michael Sync17-Nov-07 18:45 
GeneralRe: Network Traffic and Activity monitoring via ASP.Net [modified] Pin
MeNew19-Nov-07 4:25
MeNew19-Nov-07 4:25 
QuestionMaster Page(s) - Different layouts on different pages. How? Pin
Bursh.17-Nov-07 7:37
Bursh.17-Nov-07 7:37 
AnswerRe: Master Page(s) - Different layouts on different pages. How? Pin
Christian Graus17-Nov-07 8:56
protectorChristian Graus17-Nov-07 8:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.