0

Scenario :
1 : if multiple user are logged in and clicked on "request" button
2 : A user has opened multiple tabs in browser for the same url and click "request" button

NOTE: autogrant check will be fetched from database if user has prviledge.

Problem Statement :
1: if request is autogrant then server sends first email with subject as user requested and then sends second email request approved

2: if request is autogrant not available then server sends only one email with subject as "user requested"

I don't know why but sometime in Problem Statement 1: user received the second email first. i.e. in reverse order. I'm not able to figure out what is causing the issue. it's happening in both the scenario

I'm using a turbogear for my website.
i have written instruction in sequential order in python :

s.sendmail("......")     # send email for subject user request
if autogrant(user):      # check for autogrant codition
    s.sendmail("......") # send email for request approved
Cereal_Killer
  • 264
  • 2
  • 11
  • Where are you measuring the emails? (I would think the only sensible measuring point would be as they're leaving your mail server..?) – thebjorn Dec 29 '15 at 12:27
  • Thanks for the quick response. Yes! you are right. That's where it make sense,but I measured emails at client's mailbox. How can I wait for the "request approved" email to wait for "user requested" to send first ? – Cereal_Killer Dec 29 '15 at 19:17
  • 1
    Depending on the client setup you can't guarantee delivery sequence. One popular anti-spam technique is gray-listing, where the receiving email server simply says "not now, try again later". Most spam senders don't do the retry logic, so this is a very efficient anti-spam tactic, but depending on the incoming email flow messages may come out of sequence. There are many other issues that can destroy your sequence logic. First, however, you need to measure on your server, to verify that the problem is indeed on the client. Then perhaps add a waiting period..? – thebjorn Dec 29 '15 at 20:12

0 Answers0