Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Nextcloud
  3. Nextcloud Email with Gmail Relay

Nextcloud Email with Gmail Relay

Scheduled Pinned Locked Moved Nextcloud
gmailrelayemail
10 Posts 2 Posters 1.8k Views 2 Watching
  • 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.
    • E Offline
      E Offline
      eganonoa
      wrote on last edited by girish
      #1

      I have Cloudron set up to send emails via Gmail. The emails work perfectly for the Cloudron itself and for other apps like Matrix. But I cannot seem to get it to work for Nextcloud. The only way I can get email to work this way is if I manually change the email settings in Nextcloud, which then get overwritten on any app restart. This post indicates that I should just leave things as is. But I suspect that it is only if I use Cloudron to manage the email, which I can't. Am I missing something?

      nebulonN 1 Reply Last reply
      0
      • E eganonoa

        I have Cloudron set up to send emails via Gmail. The emails work perfectly for the Cloudron itself and for other apps like Matrix. But I cannot seem to get it to work for Nextcloud. The only way I can get email to work this way is if I manually change the email settings in Nextcloud, which then get overwritten on any app restart. This post indicates that I should just leave things as is. But I suspect that it is only if I use Cloudron to manage the email, which I can't. Am I missing something?

        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        @eganonoa are you generally referring to transactional emails sent out from Nextcloud or the mail client plugin for Nextcloud?
        If other apps can send out mails Nextcloud should be able to do as well, since it uses the same infrastructure then.

        E 1 Reply Last reply
        0
        • nebulonN nebulon

          @eganonoa are you generally referring to transactional emails sent out from Nextcloud or the mail client plugin for Nextcloud?
          If other apps can send out mails Nextcloud should be able to do as well, since it uses the same infrastructure then.

          E Offline
          E Offline
          eganonoa
          wrote on last edited by
          #3

          @nebulon Transactional emails. It is working for all other apps, but not Nextcloud for some reason. I've tried things like Calendar invites, user emails, etc. And it just fails each time. I need to go in manually to put the actual SMTP information for Gmail and then, of course, it works (and indeed things that have been held back like old activity notifications go out!). But that gets overwritten on app restart.

          Everything works perfectly on all other apps managed by Cloudron as far as I can tell. So it has to be something within the Nextcloud setup.

          nebulonN 1 Reply Last reply
          0
          • E eganonoa

            @nebulon Transactional emails. It is working for all other apps, but not Nextcloud for some reason. I've tried things like Calendar invites, user emails, etc. And it just fails each time. I need to go in manually to put the actual SMTP information for Gmail and then, of course, it works (and indeed things that have been held back like old activity notifications go out!). But that gets overwritten on app restart.

            Everything works perfectly on all other apps managed by Cloudron as far as I can tell. So it has to be something within the Nextcloud setup.

            nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            @eganonoa given that I cannot reproduce this, I suspect some Nextcloud plugin installed in your instance interferes here. Also note that the Nextcloud configs should not have anything related to gmail set, since mails would be sent out locally through the system and only the system should know about the relay.

            Can you check which plugins you have installed and maybe disable them. Then restart the app and check again?

            E 2 Replies Last reply
            0
            • nebulonN nebulon

              @eganonoa given that I cannot reproduce this, I suspect some Nextcloud plugin installed in your instance interferes here. Also note that the Nextcloud configs should not have anything related to gmail set, since mails would be sent out locally through the system and only the system should know about the relay.

              Can you check which plugins you have installed and maybe disable them. Then restart the app and check again?

              E Offline
              E Offline
              eganonoa
              wrote on last edited by
              #5

              @nebulon thanks. I think you are right it is related to some app or another. I just did a clean install of a nextcloud server under a different domain and it works perfectly. So there has to be some app that is doing this. i've not installed many, so it shouldn't be too hard to figure out.

              1 Reply Last reply
              0
              • nebulonN nebulon

                @eganonoa given that I cannot reproduce this, I suspect some Nextcloud plugin installed in your instance interferes here. Also note that the Nextcloud configs should not have anything related to gmail set, since mails would be sent out locally through the system and only the system should know about the relay.

                Can you check which plugins you have installed and maybe disable them. Then restart the app and check again?

                E Offline
                E Offline
                eganonoa
                wrote on last edited by
                #6

                @nebulon I figured it out! When the app restarts it overwrites nearly all, but crucially not all, email settings. The encryption protocol is not overwritten. So if, like me, you had at some point played around and, in so doing, changed encryption from None to SSL/TLS or STARTLS that will be saved even after a reboot and will, subsequently, cause the Cloudron-managed email to fail. I never picked that up across multiple restarts because I did not know the default Cloudron email settings. Once I created a new dummy Nextcloud instance i was able to compare and see the difference in the encryption protocol.

                Thanks for responding so quickly on this!

                nebulonN 1 Reply Last reply
                0
                • E eganonoa

                  @nebulon I figured it out! When the app restarts it overwrites nearly all, but crucially not all, email settings. The encryption protocol is not overwritten. So if, like me, you had at some point played around and, in so doing, changed encryption from None to SSL/TLS or STARTLS that will be saved even after a reboot and will, subsequently, cause the Cloudron-managed email to fail. I never picked that up across multiple restarts because I did not know the default Cloudron email settings. Once I created a new dummy Nextcloud instance i was able to compare and see the difference in the encryption protocol.

                  Thanks for responding so quickly on this!

                  nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #7

                  @eganonoa I am not sure which config option you are referring to, but maybe we missed one at https://git.cloudron.io/cloudron/nextcloud-app/-/blob/master/start.sh#L75 then we should fix that.

                  E 1 Reply Last reply
                  0
                  • nebulonN nebulon

                    @eganonoa I am not sure which config option you are referring to, but maybe we missed one at https://git.cloudron.io/cloudron/nextcloud-app/-/blob/master/start.sh#L75 then we should fix that.

                    E Offline
                    E Offline
                    eganonoa
                    wrote on last edited by
                    #8

                    @nebulon It's the email encryption protocol, where you can choose either None, SSL/TLS, or STARTLS. In config.php it is:

                    'mail_smtpauthtype' => 'PLAIN'

                    That is not referred to in the Nextcloud-App's start.sh file, which results in it not reverting to plain if some idiot like myself went and changed that in the Nextcloud Basic Settings area!

                    nebulonN 1 Reply Last reply
                    0
                    • E eganonoa

                      @nebulon It's the email encryption protocol, where you can choose either None, SSL/TLS, or STARTLS. In config.php it is:

                      'mail_smtpauthtype' => 'PLAIN'

                      That is not referred to in the Nextcloud-App's start.sh file, which results in it not reverting to plain if some idiot like myself went and changed that in the Nextcloud Basic Settings area!

                      nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #9

                      @eganonoa ah! looks like that option was overlooked in the packaging or introduced at some point later in the upstream code. I will fix this for 22.1.0 package then.

                      Thanks for digging into it!

                      E 1 Reply Last reply
                      2
                      • nebulonN nebulon

                        @eganonoa ah! looks like that option was overlooked in the packaging or introduced at some point later in the upstream code. I will fix this for 22.1.0 package then.

                        Thanks for digging into it!

                        E Offline
                        E Offline
                        eganonoa
                        wrote on last edited by
                        #10

                        @nebulon Thanks for helping me work through this!

                        1 Reply Last reply
                        1
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search