Foxxy My main domain is edabit.com and my forum is hosted at talk.edabit.com. I already have edabit.com set up with Mailgun, do I have to now setup the subdomain with Mailgun or can I just use the naked URL? I would like to send emails from talk@edabit.com as opposed to whatever@talk.edabit.com. I'm having a bit of difficulty getting this to work. Edit: I honestly don't care what address the email is sent from, so long as it just works.
luceos Foxxy simply configure the smtp settings for talk@edabit.com, mailgun should be able to give you the settings needed in addition to the above. For SMTP it really doesn't matter where it comes from, mailgun acts as proxy for sending messages; so no whitelisting or host checks. Mailgun verifies the credentials you send along ?
Foxxy luceos Hey Luceos, thanks for the quick reply! I swear, setting up email with any web app is always a pain. It never goes smooth for me. Here is my config: I've tried with both TLS and SSL, port 587 and 465. No dice. I will note that I do have mailgun working fine for the main edabit.com app. There were never any issues there.
radixio Foxxy After losing a whole day setting up my server, I finally got it. My settings are exactly the same as yours, and the error also. What I did was open door 2525 in my firewall and use it in place of port 465/587. Everything's working fine now.
Foxxy luceos Nope. Flarum throws the following error: Oops! Something went wrong. Please reload the page and try again. Not sure if that means anything. I'm not getting any errors in my mailgun logs. Sigh.
luceos Foxxy well my configuration has lowercase tls ? Perhaps something else is wrong, can you check your storage/log/flarum.log file and perhaps you host error log?
Foxxy luceos haha I meant "Nope" as in I tried in lowercase and got the same error. Here is a link to the log file you mentioned. I'm seeing a lot of references to zendframework but nothing meaningful to my eyes (not familiar with the stack Flarum uses).
luceos Not seeing it either, perhaps your port is blocked for outgoing requests. Hosting providers sometimes do this to prevent getting an ip on a blacklist.
Foxxy luceos I think that is the issue. Our shared IP addresses only allow outbound connection on ports 80(http), 443(https). However, I figure since I'm using a third party service to deliver mail, it wouldn't be a problem. This is a tricky one.
Foxxy 192.0.130.177 - - [15/May/2017:10:19:56 -0600] "POST /api/users/2/send-confirmation HTTP/1.1" 500 512 "http://talk.edabit.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" Is this what a sent email would look like in the server logs?
luceos Foxxy that's the access log, showing you are hitting the api endpoint on flarum, which returns a 500. So no.. Not sure how to solve your issue, switch hosting provider? ?
Foxxy luceos I'm just going to use the internal mailer. Seems to work fine with that. Now struggling to set up Google / Facebook auth. Uh.
clarkwinkelmann nimitbhargava Mailgun is now also supported via API instead of SMTP right out of the box, starting with beta 9. This can be even more reliable 😉 SMTP still required for the EU Mailgun region for now until we fix flarum/core1834