Send Email on Initial Page Load once only

T

Tatyana

Hello,

I was wondering if anybody knows how to disable Email Sending on Page
Refresh.
When shopper submits the order he/she is being redirected to the receipt
page and gets the email confirmation, which is being send once the last page
in Order Process displayed (Receipt page). Shopper is allowed to refresh
that page since the data has been inserted on the previous page. The only
problem I have is that the email is being sent every time the last page is
refreshed. How to disable this? How to check if the page has been refreshed?

Thank you,
Tatyana
 
D

Damien

Tatyana said:
Hello,

I was wondering if anybody knows how to disable Email Sending on Page
Refresh.
When shopper submits the order he/she is being redirected to the receipt
page and gets the email confirmation, which is being send once the last page
in Order Process displayed (Receipt page). Shopper is allowed to refresh
that page since the data has been inserted on the previous page. The only
problem I have is that the email is being sent every time the last page is
refreshed. How to disable this? How to check if the page has been refreshed?

Thank you,
Tatyana

If Session("EmailSent") Is Nothing then
'Send Email
Session("EmailSent") = True
End If

Unless you're really wanting to avoid using the Session.

Damien
 
M

Mischa Kroon

Damien said:
If Session("EmailSent") Is Nothing then
'Send Email
Session("EmailSent") = True
End If

Unless you're really wanting to avoid using the Session.

Damien

Viewstate is also an option, same thing as the above just substitute
"Session" with "Viewstate"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,036
Latest member
FerdinandP

Latest Threads

Top