|
 |
aspx thread: send email not working?
Message #1 by "Geeta Kalantre" <dotnetgeeta@h...> on Mon, 24 Sep 2001 18:53:16 +0000
|
|
I am using the MailMessage object to send e-mail.But it still not sending
an email.
Here is the code:
I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
program.
try
{
email = new MailMessage();
email.From= mFrom;
email.To = mTo;
email.Subject = mSubject;
email.Body = mBody;
email.BodyFormat =mBodyFormat;
email.Priority=MailPriority.High;
SmtpMail.Send(email);
mErrmsg="Success";
}
catch
{
mErrmsg = "Error Sending Message";
}
If I step through the above code it execute without error .But still when I
check for the e-mail, I never receive it.Let me know what is wrong with the
above code?
So why I am not able to get the email which is sended by using above code.
thanks,
Geeta.
Message #2 by "Albert Davis" <albertdavis@h...> on Mon, 24 Sep 2001 15:08:05 -0400
|
|
Do you have an SMTP server setup and configured on the server running this
code?
>From: "Geeta Kalantre" <dotnetgeeta@h...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>CC: aspx@p...
>Subject: [aspx] send email not working?
>Date: Mon, 24 Sep 2001 18:53:16 +0000
>
> I am using the MailMessage object to send e-mail.But it still not
>sending
>an email.
>
>Here is the code:
>I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
>program.
>
> try
> {
>
> email = new MailMessage();
> email.From= mFrom;
> email.To = mTo;
> email.Subject = mSubject;
> email.Body = mBody;
> email.BodyFormat =mBodyFormat;
> email.Priority=MailPriority.High;
> SmtpMail.Send(email);
> mErrmsg="Success";
> }
> catch
> {
> mErrmsg = "Error Sending Message";
> }
>
>If I step through the above code it execute without error .But still when I
>check for the e-mail, I never receive it.Let me know what is wrong with the
>above code?
>
>So why I am not able to get the email which is sended by using above code.
>
>
>thanks,
>Geeta.
Message #3 by "Albert Davis" <albertdavis@h...> on Mon, 24 Sep 2001 15:12:34 -0400
|
|
Also I don't see a declaration of the MailMessage class, only an
Instantiation:
Your's:
email = new MailMessage();
Correct Way:
MailMessage email = new MailMessage();
>From: "Geeta Kalantre" <dotnetgeeta@h...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>CC: aspx@p...
>Subject: [aspx] send email not working?
>Date: Mon, 24 Sep 2001 18:53:16 +0000
>
> I am using the MailMessage object to send e-mail.But it still not
>sending
>an email.
>
>Here is the code:
>I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
>program.
>
> try
> {
>
> email = new MailMessage();
> email.From= mFrom;
> email.To = mTo;
> email.Subject = mSubject;
> email.Body = mBody;
> email.BodyFormat =mBodyFormat;
> email.Priority=MailPriority.High;
> SmtpMail.Send(email);
> mErrmsg="Success";
> }
> catch
> {
> mErrmsg = "Error Sending Message";
> }
>
>If I step through the above code it execute without error .But still when I
>check for the e-mail, I never receive it.Let me know what is wrong with the
>above code?
>
>So why I am not able to get the email which is sended by using above code.
>
>
>thanks,
>Geeta.
Message #4 by "David Higgins" <david@h...> on Mon, 24 Sep 2001 20:19:16 +0100
|
|
Geeta,
Check your Inetpub\MailRoot\Queue directory, if you see your emails in
this directory it is the configuration of your SMPT mail server.
David
-----Original Message-----
From: Geeta Kalantre [mailto:dotnetgeeta@h...]
Sent: 24 September 2001 19:53
To: ASP+
Cc: aspx@p...
Subject: [aspx] send email not working?
I am using the MailMessage object to send e-mail.But it still not
sending
an email.
Here is the code:
I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
program.
try
{
email = new MailMessage();
email.From= mFrom;
email.To = mTo;
email.Subject = mSubject;
email.Body = mBody;
email.BodyFormat =mBodyFormat;
email.Priority=MailPriority.High;
SmtpMail.Send(email);
mErrmsg="Success";
}
catch
{
mErrmsg = "Error Sending Message";
}
If I step through the above code it execute without error .But still
when I
check for the e-mail, I never receive it.Let me know what is wrong with
the
above code?
So why I am not able to get the email which is sended by using above
code.
thanks,
Geeta.
Message #5 by "Geeta Kalantre" <dotnetgeeta@h...> on Tue, 25 Sep 2001 13:25:10 +0000
|
|
Hello,
Thank you.I did find the emails in Inetpub\MailRoot\Queue directory.
But How I can see those emails when I logon to my email account using
outlook express.Because when I check the emails in outlook express they are
not shoing up.Is there any way to show them there (OUTLOOK EXPRESS)?
Do I have to change the configuration of my SMTP mail server? How I can do
that? Because we don't have SMPT server and webserver on single machine?
Thanks,
Geeta.
>From: "David Higgins" <david@h...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] RE: send email not working?
>Date: Mon, 24 Sep 2001 20:19:16 +0100
>
>Geeta,
>
>Check your Inetpub\MailRoot\Queue directory, if you see your emails in
>this directory it is the configuration of your SMPT mail server.
>
>David
>
>-----Original Message-----
>From: Geeta Kalantre [mailto:dotnetgeeta@h...]
>Sent: 24 September 2001 19:53
>To: ASP+
>Cc: aspx@p...
>Subject: [aspx] send email not working?
>
> I am using the MailMessage object to send e-mail.But it still not
>sending
>an email.
>
>Here is the code:
>I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
>program.
>
> try
> {
>
> email = new MailMessage();
> email.From= mFrom;
> email.To = mTo;
> email.Subject = mSubject;
> email.Body = mBody;
> email.BodyFormat =mBodyFormat;
> email.Priority=MailPriority.High;
> SmtpMail.Send(email);
> mErrmsg="Success";
> }
> catch
> {
> mErrmsg = "Error Sending Message";
> }
>
>If I step through the above code it execute without error .But still
>when I
>check for the e-mail, I never receive it.Let me know what is wrong with
>the
>above code?
>
>So why I am not able to get the email which is sended by using above
>code.
>
>
>thanks,
>Geeta.
Message #6 by Todd Carrico <ToddC@m...> on Tue, 25 Sep 2001 09:37:54 -0500
|
|
The SMTP server is really meant for sending, or relaying. It will receive
mail just fine, but has no provision for routing them, i.e. it has only one
"mail box".
It they are in the Queue directory; they have not been "sent". The SMTP
Server has received them, and placed them in the Queue for processing.
Not sure how to tie it into Outlook Express, or if it is even possible.
This is getting OT.
tc
-----Original Message-----
From: Geeta Kalantre [mailto:dotnetgeeta@h...]
Sent: Tuesday, September 25, 2001 8:25 AM
To: ASP+
Subject: [aspx] RE: send email not working?
Hello,
Thank you.I did find the emails in Inetpub\MailRoot\Queue directory.
But How I can see those emails when I logon to my email account using
outlook express.Because when I check the emails in outlook express they are
not shoing up.Is there any way to show them there (OUTLOOK EXPRESS)?
Do I have to change the configuration of my SMTP mail server? How I can do
that? Because we don't have SMPT server and webserver on single machine?
Thanks,
Geeta.
>From: "David Higgins" <david@h...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] RE: send email not working?
>Date: Mon, 24 Sep 2001 20:19:16 +0100
>
>Geeta,
>
>Check your Inetpub\MailRoot\Queue directory, if you see your emails in
>this directory it is the configuration of your SMPT mail server.
>
>David
>
>-----Original Message-----
>From: Geeta Kalantre [mailto:dotnetgeeta@h...]
>Sent: 24 September 2001 19:53
>To: ASP+
>Cc: aspx@p...
>Subject: [aspx] send email not working?
>
> I am using the MailMessage object to send e-mail.But it still not
>sending
>an email.
>
>Here is the code:
>I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
>program.
>
> try
> {
>
> email = new MailMessage();
> email.From= mFrom;
> email.To = mTo;
> email.Subject = mSubject;
> email.Body = mBody;
> email.BodyFormat =mBodyFormat;
> email.Priority=MailPriority.High;
> SmtpMail.Send(email);
> mErrmsg="Success";
> }
> catch
> {
> mErrmsg = "Error Sending Message";
> }
>
>If I step through the above code it execute without error .But still
>when I
>check for the e-mail, I never receive it.Let me know what is wrong with
>the
>above code?
>
>So why I am not able to get the email which is sended by using above
>code.
>
>
>thanks,
>Geeta.
Message #7 by Tim Heuer <TimH@i...> on Tue, 25 Sep 2001 10:31:29 -0700
|
|
Geeta,
You need to configure the SMTP service to deliver the messages or relay to
another SMTP server that will. You will find these setting sin the
"Advanced" section of the "Delivery" tab of the SMTP server/service. You
may want to look on MSDN or other sites to accurately configure this
service.
Tim
-----Original Message-----
From: Geeta Kalantre [mailto:dotnetgeeta@h...]
Sent: Tuesday, September 25, 2001 6:25 AM
To: ASP+
Subject: [aspx] RE: send email not working?
Hello,
Thank you.I did find the emails in Inetpub\MailRoot\Queue directory. But
How I can see those emails when I logon to my email account using outlook
express.Because when I check the emails in outlook express they are
not shoing up.Is there any way to show them there (OUTLOOK EXPRESS)? Do I
have to change the configuration of my SMTP mail server? How I can do
that? Because we don't have SMPT server and webserver on single machine?
Thanks,
Geeta.
>From: "David Higgins" <david@h...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] RE: send email not working?
>Date: Mon, 24 Sep 2001 20:19:16 +0100
>
>Geeta,
>
>Check your Inetpub\MailRoot\Queue directory, if you see your emails in
>this directory it is the configuration of your SMPT mail server.
>
>David
>
>-----Original Message-----
>From: Geeta Kalantre [mailto:dotnetgeeta@h...]
>Sent: 24 September 2001 19:53
>To: ASP+
>Cc: aspx@p...
>Subject: [aspx] send email not working?
>
> I am using the MailMessage object to send e-mail.But it still not
>sending an email.
>
>Here is the code:
>I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my
>program.
>
> try
> {
>
> email = new MailMessage();
> email.From= mFrom;
> email.To = mTo;
> email.Subject = mSubject;
> email.Body = mBody;
> email.BodyFormat =mBodyFormat;
> email.Priority=MailPriority.High;
> SmtpMail.Send(email);
> mErrmsg="Success";
> }
> catch
> {
> mErrmsg = "Error Sending Message";
> }
>
>If I step through the above code it execute without error .But still
>when I check for the e-mail, I never receive it.Let me know what is
>wrong with the
>above code?
>
>So why I am not able to get the email which is sended by using above
>code.
>
>
>thanks,
>Geeta.
|
|
 |