So, as you may know, last weekend the game moved from Tom’s server, where it had been hosted for the last few years, to our server, where it immediately got a couple dozen or so different updates applied, both fixing long broken things and adding in smaller new features.
That’s not to say that the server move was entirely smooth, though. One of our updates to the game was glitchy, an update to some of the code the game is reliant on broke a few pages, and I discovered that I, Andrew, don’t know how to setup an email server as well as I thought I did.
That said, I’d like to do a bit of a post mortem here for any future Symfony developers out there who run into the same situation I did, and if you’re curious what exactly happened, read on. Otherwise, I’ll take more about the game itself and it’s future in a later update.
So, what DID happen with the game’s emails? Well, I believe it was a couple of things. First, I’d, rather stupidly, forgotten to change the FOS User Bundle From settings to the new mail server I’ve got managing things. This meant that some emails were going out, but not all, and especially not the important ones like user account activation or password reset emails.
Secondly, in the process of fixing this, I stood up an entire null client email server on the local machine, thinking maybe the problem was authenticating with the remote mail server. Standing up the null client bypasses that, as long as your records are setup right, as it can send email entirely on it’s own. This is where I encountered my second, and more irritating problem.
And I say irritating, because I probably went through a dozen different google search result pages trying to find ANY answer. So here’s my answer:
If you have both FOS User Bundle and SwiftMailer configurations set to use the right information for your mail server and the emails all match up, and you find yourself in a situation where only SOME of your emails get sent, and maybe even specifically NONE from FOS User Bundle, disable your mail spool.
That’s right, go into your config.yml, find the lines under the SwiftMailert configuration (usually starting with “swiftmailer:” and then all it’s config options) that read:
And regardless of what they are configured to, after backing up the file, remove all three of them, and reload the symfony cache.
What this will do is have your SwiftMailer installation communicate directly and immediately with your mail host, EVERY time it needs to send an email. Now, I’d only recommend this if your mail host is either the local machine (LOCALHOST or 127.0.0.1) or directly connected to the machine your hosting on, otherwise you’re going to introduce a lot of latency into every action that involves sending an email.
Anyways, the next update will go back to our regular scheduled posts about the game and it’s development and such.