Oh so that's the correct value for encryption. Thanks

Yay thanks, I got it working. For some reason the mail config extension didn't add the tables...

    19 days later

    BlackSheep Is this extension compatible with beta 5? I installed

    composer require vingle/flarum-configure-smtp
    

    then created a Mailgun account and verified my domain, but cannot get this to work using the following settings:

    mail driver: smtp
    mail encryption: TLS
    mail port: 587
    mail host: smtp.mailgun.org
    mail username: email.address@mg.domain.com
    mail password: password for above account
    mail from: same as username email address

    Here is the error debug:

    POST http://forum.singletrackbc.com/api/forgot
    
    {
      "errors": [
        {
          "status": "404",
          "code": "resource_not_found"
        }
      ]
    }

    UPDATE: I just checked the Mailgun outgoing mail settings, and they ae as follows:

    TLS Connection: Opportunistic
    Certificate Verification: Required

    Thoughts?

    UPDATE #2: I got it to work by changing the encryption and port to the following:

    mail encryption: SSL
    mail port: 465

    UPDATE #3: The "fix" in Update #2 only works once. I just tried repeating the lost password recovery but was prompted with a "Email address you entered does not exit" error.

    Anyhoo, it's bed time...

    The smtp configuration extension has been working for me.

    This discussion reminds me that I should do the same but for gmail. ?

      VIRUXE My "Update #3" must have been an isolated incident. Everything seems to be working fine using SSL and port 465 (but not using TLS and port 587).

      7 months later

      Still, I am bit confused here. How can I get mailgun subdomain here that you mentioned there?

      mail_from : [put here the sender address you'd like to use, ending with your mailgun subdomain]

      For example, my domain is sclrship.com so that my subdomain should be what? How can I set that?

      6 months later

      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.

        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 ?

          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.

            Not sure, try tls in lowercase. Not seeing any flaws.

              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.

                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?

                  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).

                  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.

                    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.

                    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?

                      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? ?

                        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.