I’m on my honeymoon, but the hubs is out doing touristy stuff in a car on bumpy sand dunes, which would be a one way ticket for me to puke-town. I get really bad car sickness, especially on bumpy roads.
So obviously I took this opportunity to
- update his OS on his netbook, because omg.
- create an account for me on there, because his settings are: spanish keyboard german chrome. Making Hell OS even more hell
- learn more rails
I thought I had followed the setup instructions for mailgun on heruko properly
I set up my sending email, configured my environment.rb file to use mailgun and was still getting an error on my herokuapp domain when sending. No log activity at all was being recorded.
- It turns out that when I log into heroku and click the app for mailgun there, it’s different to logging in directly to mailgun and creating an account there. On mailgun website, I create a separate account for me to use there, and then verify that account and add the sending email – basically all the steps I already did on the heroku website and assumed where mirrored. The difference was my account was now verified to send mail.
- That done, I could now send the curl command and see the app was configured correctly.
- I hadn’t tested on the dev server because -hey, it couldn’t send email, so what was the point? Right? Wrong. Testing on the dev server showed a nice little error on my form. Or more accurately, my contacts_controller.erb
- I couldn’t see what I had typed wrong (and I’m using a keyboard which the keys do not correspond to keyboard layout, so i’m using memory here), so pasted the entire code from the tutorial in to check and tested again. because life is short and git diff exists.
- Oh lookie, it works now on dev!
- Git push and test on live, and it’s working.
So, in summery: set up your mailgun account direct on the mailgun site, not through heroku apps configuration. Always test on dev to make sure you haven’t messed up something basic.