FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Unable to send email via JavaMailCan't send command to SMTP host

    Scheduled Pinned Locked Moved
    General Discussion
    3
    6
    8.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aaron.rasch
      last edited by aaron.rasch

      Stuck configuring email settings for my default tenant, using Microsoft365. Topic title is the error message I get when attempting to send test email. See screengrab:

      FusionAuth Mail Error.png

      Found something perhaps similar in openkm forums:
      https://forum.openkm.com/viewtopic.php?t=22215

      ?

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        Can you try connecting to office 365 to send mail using https://jetmore.org/john/code/swaks/ ?

        I find that to be helpful to debug smtp issues.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        A 1 Reply Last reply Reply Quote 0
        • A
          aaron.rasch @dan
          last edited by

          @dan Thanks, Dan. Is STARTTLS enabled in FusionAuth JavaMail?

          1 Reply Last reply Reply Quote 0
          • danD
            dan
            last edited by

            Yes, if you enable TLS for the email configuration, mail.smtp.starttls.enable is set to true.

            Here's more about the javamail config (which I expect you are already familiar with, just adding for completeness): https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • robotdanR
              robotdan
              last edited by

              Is this "the" A-aron!!!! 🙂 Howdy sir!

              When you set Security to TLS in the FusionAuth UI, we set mail.smtp.starttls.enable=true which tells the Java Mail API to use STARTTLS.

              In most cases our SMTP configuration will be adequate, if you find additional configuration required that is available via the Java Mail API that @dan posted, these can be added in the Tenant advanced configuration (Tenant > Advanced > SMTP Settings) using the Additional properties field. This field takes key value pairs as defined by the Java Mail API.

              Let us know if that still doesn't work, and we can go from there.

              1 Reply Last reply Reply Quote 1
              • A
                aaron.rasch
                last edited by

                'Tis I indeed! Continuing my signature moves of knowing juuuuuust enough to be dangerous to myself and others LOL. I'm checking the settings now, thanks to you and Dan for the support!

                1 Reply Last reply Reply Quote 1
                • joshuaJ joshua referenced this topic on
                • First post
                  Last post