Page 1 of 1

Play by email issues

Posted: Tue Apr 09, 2019 2:33 pm
by Rmatt
Hi folks,

First of all, thanks for all the efforts to get back Freecivweb working! It's great! :-)

I am playing with some colleagues and we already experienced some issues with the mail services in the past week. Once the domain of the link "" was not responding for several hours and currently, although it is my turn to play, I haven't received the email since I should play (couple of hours already).

Currently I'm not able to enter Turn 4, although the server know it's my turn. But funnily, if I use the link of round 2 or 3, I could enter there and go again to this round... Which I guess is also a bug rather than a feature. It would be great if any old link, or any permanent link from the website could allow each player to login for the current round, without requesting that precise/particular link.

All the best,

Re: Play by email issues

Posted: Tue Apr 09, 2019 3:12 pm
by Rmatt
One possibility would be to extend the /mailstatus server to eventually include the "pbem_processed", so that this can be translated to a link on the status website...
Meaning here ...
and here ... e/list.jsp

I'm not sure in how far this is sensible data that could be used by other players...

Re: Play by email issues

Posted: Tue Apr 09, 2019 3:42 pm
by Rmatt
For the other problem, I think also that the file ... pt/pbem.js could be changed to

1. Check if it is really the turn of the user logging in to play (and not simply via SimpleStorage, it's easy enough to use another browser)
2. Return the latest savegame and not offer the possibility to restart another turn

But I'm not sure, maybe the data collected in ... em/ in loaded_games or pbem-games.json should not be known or accessible by other parts of the infrastructure...

I am willing to help on the software-side, but I know too little of the system itself to be able to make good decisions

Re: Play by email issues

Posted: Tue Apr 09, 2019 5:09 pm
by AndreasR
I got this error mail from SendInBlue:


Your hourly quota for your SendinBlue SMTP account has been reached. Your new messages will be saved in the backlog. Saved messages will be retried again during your next hour quota.

If you want to increase your SMTP hourly quota, you can choose to send your emails via a dedicated IP. It allows you to digitally sign your emails with your own subdomain and fully manage your reputation. By choosing the dedicated IP, you'll have no limit of items per hour. For more information on configuring the dedicated IP, please click here. The last step is to link your dedicated IP to your SMTP account.

Kind regards,
The SendinBlue Team"

Re: Play by email issues

Posted: Tue Apr 09, 2019 5:10 pm
by AndreasR
In other words, please donate:

Re: Play by email issues

Posted: Wed Apr 10, 2019 5:11 pm
by Rmatt
Hi Andreas,
I am fine with contributing/donating however this won't fix the problems:

As we can see here, the limit is 300 emails per day, which I doubt are reached. Also in opposition to the mail you received, the mails don't get delay, they just disappear, I still have received nothing...
In case they try to force us to pay, the next step is 20$/month, which I think can be better invested somewhere else AND to get an IP (as suggested in the mail) it is more than 50$/month

So one option would be to switch the mail provider, choosing between MailChimp, MailJet and MailGun which all offer pretty similar free tiers. It's more about getting one that would let us leave in peace than optimizing the choice based on features...

The other one is to change the code in order to be able to access the game from a website, not strictly requiring the game to play! (For example, as the /mailstatus endpoint is open for all, it would be very easy to write a plugin/an integration for Slack (or whatever else) that would check for the next turn and post it otherwise than per mail. This needs the link that for now is only available per mail... This was the sense of my help suggestions before, if anyone has more insights on the code and the implication of exposing the pbem/savegame

Re: Play by email issues

Posted: Fri Apr 12, 2019 1:10 pm
by Rmatt
Yet another option for the mail server would be to have a lambda function sending mails via AWS SES.
10 cents per 1000 mails. And I'm not sure if we even get the 60k free if sent from EC2 when they are sent via Lambda Functions. In any case a much more affordable paying option than the one from SendInBlue