Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP CDO mail only works when browser cache is cleared

Reply
Thread Tools

ASP CDO mail only works when browser cache is cleared

 
 
Henry
Guest
Posts: n/a
 
      11-06-2007
I have a simple form on a page in my website in which a user can enter
an email address to be added to a mailing list.

The following ASP script works the first time a user submits his or
her email address. However, if the same user tries to submit another
email, the browser hangs and times out. If the user clears the
browser's cache, this script works fine. Could someone please explain
this behaviour and how I can resolve it?

Thanks!

<%

Set myMail=CreateObject("CDO.Message")
myMail.Subject= "MAILING LIST ADDITION"
myMail.From= Request.Form.Item(1)
myMail.To="(E-Mail Removed)"
myMail.TextBody= "Please add the following person to the mailing list:
" & VbCrLf & VbCrLf & Request.Form.Item(1)
myMail.Send
set myMail=nothing
Response.Redirect "http://www.domain.com"

%>

 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      11-08-2007
"Henry" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> I have a simple form on a page in my website in which a user can enter
> an email address to be added to a mailing list.
>
> The following ASP script works the first time a user submits his or
> her email address. However, if the same user tries to submit another
> email, the browser hangs and times out. If the user clears the
> browser's cache, this script works fine. Could someone please explain
> this behaviour and how I can resolve it?
>
> Thanks!
>
> <%
>
> Set myMail=CreateObject("CDO.Message")
> myMail.Subject= "MAILING LIST ADDITION"
> myMail.From= Request.Form.Item(1)
> myMail.To="(E-Mail Removed)"
> myMail.TextBody= "Please add the following person to the mailing list:
> " & VbCrLf & VbCrLf & Request.Form.Item(1)
> myMail.Send
> set myMail=nothing
> Response.Redirect "http://www.domain.com"
>
> %>
>


I'm struggling to respond to this. Its somewhat incoherant. Are you sure
the mail server you are using allows emails to apparently come from any
random address?

What does the form look like? I think we need to see that.
I take it the page of code above is the action page of the form?
You then redirect to the root of your site how does the user get to the form
again?


--
Anthony Jones - MVP ASP/ASP.NET



 
Reply With Quote
 
 
 
 
Henry
Guest
Posts: n/a
 
      11-08-2007
The form is a simple text field on a "Contact Us" page of our website.
The user enters an email address and clicks on a Send button. The
scipt above is the action page which redirects the user back to the
homepage. Sorry if it wasn't clear.

To my knowledge, our server does not validate the email address. In my
testing, I am able to successfully send an email via the form only
once. And then I need to clear my browser cache for it to work again.

I'm stumped!



On Nov 8, 8:06 am, "Anthony Jones" <(E-Mail Removed)> wrote:
> "Henry" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ups.com...
>
>
>
>
>
> > I have a simple form on a page in my website in which a user can enter
> > an email address to be added to a mailing list.

>
> > The following ASP script works the first time a user submits his or
> > her email address. However, if the same user tries to submit another
> > email, the browser hangs and times out. If the user clears the
> > browser's cache, this script works fine. Could someone please explain
> > this behaviour and how I can resolve it?

>
> > Thanks!

>
> > <%

>
> > Set myMail=CreateObject("CDO.Message")
> > myMail.Subject= "MAILING LIST ADDITION"
> > myMail.From= Request.Form.Item(1)
> > myMail.To="(E-Mail Removed)"
> > myMail.TextBody= "Please add the following person to the mailing list:
> > " & VbCrLf & VbCrLf & Request.Form.Item(1)
> > myMail.Send
> > set myMail=nothing
> > Response.Redirect "http://www.domain.com"

>
> > %>

>
> I'm struggling to respond to this. Its somewhat incoherant. Are you sure
> the mail server you are using allows emails to apparently come from any
> random address?
>
> What does the form look like? I think we need to see that.
> I take it the page of code above is the action page of the form?
> You then redirect to the root of your site how does the user get to the form
> again?
>
> --
> Anthony Jones - MVP ASP/ASP.NET- Hide quoted text -
>
> - Show quoted text -



 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      11-08-2007
"Henry" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> The form is a simple text field on a "Contact Us" page of our website.
> The user enters an email address and clicks on a Send button. The
> scipt above is the action page which redirects the user back to the
> homepage. Sorry if it wasn't clear.
>
> To my knowledge, our server does not validate the email address. In my
> testing, I am able to successfully send an email via the form only
> once. And then I need to clear my browser cache for it to work again.
>
> I'm stumped!
>



I'm not sure it such a good idea to do redirect in response to a post
anyway.

You might be better of sending some content back thanking the user for their
interest etc blah.

--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is ("http://schemas.microsoft.com/cdo/configuration/sendusing") doing in CDO uofs76@yahoo.com ASP General 0 02-07-2007 01:09 PM
Browser History Getting Cleared Sporadically BrainTop ASP .Net 2 10-17-2006 11:36 AM
invalid mail address gives error in CDO mail newbie ASP General 2 03-03-2004 05:13 AM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM
CDO for Windows 2000 vs CDO for Exchange 2000 ASP .Net 2 07-11-2003 12:31 PM



Advertisments