Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Sending Email from Aspx Page


Message #1 by "Uma Maheswari" <maheswarim@r...> on 5 Feb 2001 09:55:09 -0000
hi,



I tried out sending Email from an Aspx, the same as

given in www.123aspx.com.



But it is not sent, at the same time I am 

not getting any error, it seems as if the

message is successfully sent...... but

actually not sent



What's the problem?  Do I have to configure anything?



Please help me to solve this.



Rgds,



Uma







Message #2 by "dave" <support@1...> on Mon, 5 Feb 2001 07:55:04 -0600
Hi Uma,

Can you send me the exact link? Or post your code... I'd be happy to take a

look at it.  Also, make sure you have SMTP service turned on.  As that is

what ASP.NET uses to send emails.



Thanks,

dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http://www.123aspx.com

The Largest ASP.NET Web Directory!

Find the latest ASP.NET resources --

Subscribe to our newsletter!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message -----

From: "Uma Maheswari" <maheswarim@r...>

To: "ASP+" <aspx@p...>

Sent: Monday, February 05, 2001 3:55 AM

Subject: [aspx] Sending Email from Aspx Page





> hi,

>

> I tried out sending Email from an Aspx, the same as

> given in www.123aspx.com.

>

> But it is not sent, at the same time I am

> not getting any error, it seems as if the

> message is successfully sent...... but

> actually not sent

>

> What's the problem?  Do I have to configure anything?

>

> Please help me to solve this.

>

> Rgds,

>

> Uma

>

>

>

Message #3 by John Pirkey <mailjohnny101@y...> on Mon, 5 Feb 2001 07:00:21 -0800 (PST)
When I first did tried it, i wasn't sure if it sent or not because it took an

unusually long amount of time, but the email did finally come through.  subsequent

calls actually came in before my original call.  can't explain it.  i used the

example from www.asp101.com/samples/email.asp (the asp+ downloadable version).



john



--- Uma  Maheswari <maheswarim@r...> wrote:

> hi,

> 

> I tried out sending Email from an Aspx, the same as

> given in www.123aspx.com.

> 

> But it is not sent, at the same time I am 

> not getting any error, it seems as if the

> message is successfully sent...... but

> actually not sent

> 

> What's the problem?  Do I have to configure anything?

> 

> Please help me to solve this.

> 

> Rgds,

> 

> Uma

> 

> 

> 

=====



---------------------------- 

John Pirkey 

MCSD 

John@S... 

http://www.stlvbug.org



Message #4 by Aftab Ahmad <aftab.ahmad@k...> on Tue, 6 Feb 2001 09:13:16 +0100
Have you configure SMTP services.



-----Original Message-----

From: Uma Maheswari [mailto:maheswarim@r...]

Sent: 5. februar 2001 10:55

To: ASP+

Subject: [aspx] Sending Email from Aspx Page





hi,



I tried out sending Email from an Aspx, the same as

given in www.123aspx.com.



But it is not sent, at the same time I am 

not getting any error, it seems as if the

message is successfully sent...... but

actually not sent



What's the problem?  Do I have to configure anything?



Please help me to solve this.



Rgds,



Uma







Message #5 by "Uma Maheswari" <maheswarim@r...> on 6 Feb 2001 04:15:28 -0000
hi,



This is the exact link,

http://www.123aspx.com/resdetail.asp?rid=618



I tried the same code, given in this link. 

SMTP Service is also turned On.



Here is the code that I tried:



<% @Import Namespace="System.Web.Util" %> 

<script language="C#" runat="server">

void btnSend_Click(Object src, EventArgs E) 

{

try 

{

MailMessage myMailMsg = new MailMessage();



myMailMsg.To = To.Text; 

myMailMsg.From = From.Text;

myMailMsg.Subject = Subject.Text;

myMailMsg.Body = Body.Text;

myMailMsg.BodyFormat = MailFormat.Html; 

SmtpMail.Send(myMailMsg); 

msg.Text = "Message Sent";

}

catch

{

msg.Text = "Error Sending Message";

}

}

</script>



Thanks,



Uma





------------- Original Message --------------

"dave" <support@1...> wrote:

To:"ASP+" <aspx@p...>

From:"dave" <support@1...>

Date:Mon, 5 Feb 2001 07:55:04 -0600

Subject: [aspx] Re: Sending Email from Aspx Page



Hi Uma,

Can you send me the exact link? Or post your code... I'd be happy to take a

look at it.  Also, make sure you have SMTP service turned on.  As that is

what ASP.NET uses to send emails.



Thanks,

dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http://www.123aspx.com

The Largest ASP.NET Web Directory!

Find the latest ASP.NET resources --

Subscribe to our newsletter!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message -----

From: "Uma Maheswari" <maheswarim@r...>

To: "ASP+" <aspx@p...>

Sent: Monday, February 05, 2001 3:55 AM

Subject: [aspx] Sending Email from Aspx Page





> hi,

>

> I tried out sending Email from an Aspx, the same as

> given in www.123aspx.com.

>

> But it is not sent, at the same time I am

> not getting any error, it seems as if the

> message is successfully sent...... but

> actually not sent

>

> What's the problem?  Do I have to configure anything?

>

> Please help me to solve this.

>

> Rgds,

>

> Uma

>

>

>

Message #6 by "dave" <support@1...> on Tue, 6 Feb 2001 06:46:02 -0800
Thanks!

try this... i rec'd the email instantly.



<%@ Page EnableSessionState="false" MaintainState="false"%>

<% @Import Namespace="System.Web.Util" %> 



<script language="C#" runat="server">



void btnSend_Click(Object src, EventArgs E) {

myLabel.Text = "button clicked";

try {



MailMessage myMailMsg = new MailMessage();



myMailMsg.To = To.Text; 

myMailMsg.From = From.Text;

myMailMsg.Subject = Subject.Text;

myMailMsg.Body = Body.Text;



myMailMsg.BodyFormat = MailFormat.Html; 

SmtpMail.Send(myMailMsg); 



msg.Text = "Message Sent";



}



catch {



msg.Text = "Error Sending Message";



}



}



</script>

<html>

<body>

<form runat="server">

<asp:label id="myLabel" runat="server" />

<asp:label id="msg" runat="server" />

	<table>

		<tr>

			<td> </td>

			<td>

				<span id="msg"></span>

			</td>

		</tr>

		<tr>

			<td>To (Email):</td>

			<td>

				<asp:Textbox  id="To" runat="server" />

			</td>

		</tr>

		<tr>

			<td>From (Email):</td>

			<td>

				<asp:Textbox  id="From" runat="server"  />

			</td>

		</tr>

		<tr>

			<td>Subject:</td>

			<td>

				<asp:Textbox  id="Subject"  runat="server" />

			</td>

		</tr>

		<tr>

			<td>Body:</td>

			<td>

				<asp:Textbox  rows="5" cols="50" id="Body" runat="server" />

			</td>

		</tr>

		<tr>

			<td> </td>

			<td>

				<asp:button  Text="Send" onclick="btnSend_Click" id="btnSend" runat="server" />

			</td>

		</tr>

	</table>



</form>







---------- Original Message ----------------------------------

From: "Uma  Maheswari" <maheswarim@r...>

Reply-To: "ASP+" <aspx@p...>

Date: 6 Feb 2001 04:15:28 -0000



>hi,

>

>This is the exact link,

>http://www.123aspx.com/resdetail.asp?rid=618

>

>I tried the same code, given in this link. 

>SMTP Service is also turned On.

>

>Here is the code that I tried:

>

><% @Import Namespace="System.Web.Util" %> 

><script language="C#" runat="server">

>void btnSend_Click(Object src, EventArgs E) 

>{

>try 

>{

>MailMessage myMailMsg = new MailMessage();

>

>myMailMsg.To = To.Text; 

>myMailMsg.From = From.Text;

>myMailMsg.Subject = Subject.Text;

>myMailMsg.Body = Body.Text;

>myMailMsg.BodyFormat = MailFormat.Html; 

>SmtpMail.Send(myMailMsg); 

>msg.Text = "Message Sent";

>}

>catch

>{

>msg.Text = "Error Sending Message";

>}

>}

></script>

>

>Thanks,

>

>Uma

>

>

>------------- Original Message --------------

>"dave" <support@1...> wrote:

>To:"ASP+" <aspx@p...>

>From:"dave" <support@1...>

>Date:Mon, 5 Feb 2001 07:55:04 -0600

>Subject: [aspx] Re: Sending Email from Aspx Page

>

>Hi Uma,

>Can you send me the exact link? Or post your code... I'd be happy to take a

>look at it.  Also, make sure you have SMTP service turned on.  As that is

>what ASP.NET uses to send emails.

>

>Thanks,

>dave

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>http://www.123aspx.com

>The Largest ASP.NET Web Directory!

>Find the latest ASP.NET resources --

>Subscribe to our newsletter!

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>----- Original Message -----

>From: "Uma Maheswari" <maheswarim@r...>

>To: "ASP+" <aspx@p...>

>Sent: Monday, February 05, 2001 3:55 AM

>Subject: [aspx] Sending Email from Aspx Page

>

>

>> hi,

>>

>> I tried out sending Email from an Aspx, the same as

>> given in www.123aspx.com.

>>

>> But it is not sent, at the same time I am

>> not getting any error, it seems as if the

>> message is successfully sent...... but

>> actually not sent

>>

>> What's the problem?  Do I have to configure anything?

>>

>> Please help me to solve this.

>>

>> Rgds,

>>

>> Uma

>>

>>

>>

Message #7 by "Gopinath Varadharajan" <vgopinath@h...> on Wed, 07 Feb 2001 00:36:24
From <Gopinath@M...>



Either Restart your System & try or Remove /Re-install SMTP Service & Try 

Again.. This steps solved a similar problem for Us.



Thanks,



Gopinath



Subject: Re: Sending Email from Aspx Page

From: "Uma  Maheswari" <maheswarim@r...>

Date: 6 Feb 2001 04:15:28 -0000

X-Message-Number: 2



hi,



This is the exact link,

http://www.123aspx.com/resdetail.asp?rid=618



I tried the same code, given in this link.

SMTP Service is also turned On.



Here is the code that I tried:



<% @Import Namespace="System.Web.Util" %>

<script language="C#" runat="server">

void btnSend_Click(Object src, EventArgs E)

{

try

{

MailMessage myMailMsg = new MailMessage();



myMailMsg.To = To.Text;

myMailMsg.From = From.Text;

myMailMsg.Subject = Subject.Text;

myMailMsg.Body = Body.Text;

myMailMsg.BodyFormat = MailFormat.Html;

SmtpMail.Send(myMailMsg);

msg.Text = "Message Sent";

}

catch

{

msg.Text = "Error Sending Message";

}

}

</script>



Thanks,



Uma




  Return to Index