Send Email on Initial Page Load once only

  • Thread starter Thread starter Tatyana
  • Start date Start date
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
 
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
 
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"
 
Back
Top