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. WordPress (Developer)
  3. smtp mailer config lost after restore from backup

smtp mailer config lost after restore from backup

Scheduled Pinned Locked Moved WordPress (Developer)
10 Posts 4 Posters 1.4k Views 4 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.
  • Z Offline
    Z Offline
    zappy
    wrote on last edited by
    #1

    SMTP Mailer quits working after I import a Wordpress site from backup. Meaning email stops working. The backups re-do all the themes, plugins, users, etc so SMTP Mailer usually gets deactivated or removed.

    Before I do a site restore, I get all the SMTP Mailer settings. Except for password, I don't know how to get it or if one is even used.

    I've tried putting all the settings in after installing SMTP Mailer on the restored sites. But I think it's the password that isn't working since I don't know it or how to get it.

    Does anyone know how to get that default SMTP credentials password or how I can get SMTP mailer to work?

    Thanks,

    1 Reply Last reply
    0
    • subvenS Offline
      subvenS Offline
      subven
      wrote on last edited by
      #2

      Just create a dummy Cloudron user and assign him a mail account. Use the users credentials for the SMTP Mailer plugin.

      Z 1 Reply Last reply
      0
      • subvenS subven

        Just create a dummy Cloudron user and assign him a mail account. Use the users credentials for the SMTP Mailer plugin.

        Z Offline
        Z Offline
        zappy
        wrote on last edited by
        #3

        @subven That's my plan C if there isn't an easier way. Plan B is a different plugin and Mailgun. I'd prefer to use the default smtp mailer with the default account settings or figure out how to capture it's password in the future before I restore from backup.

        I seem to be doing a lot of these. Where I need to import a site from somewhere from a backup with various WP backup plugins/formats and get it running. Mail is always my stopping point. So I'd like to figure out a better workflow. Easiest way to get mail out with the least amount of steps after a backup import.

        girishG 1 Reply Last reply
        0
        • Z zappy

          @subven That's my plan C if there isn't an easier way. Plan B is a different plugin and Mailgun. I'd prefer to use the default smtp mailer with the default account settings or figure out how to capture it's password in the future before I restore from backup.

          I seem to be doing a lot of these. Where I need to import a site from somewhere from a backup with various WP backup plugins/formats and get it running. Mail is always my stopping point. So I'd like to figure out a better workflow. Easiest way to get mail out with the least amount of steps after a backup import.

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by girish
          #4

          @zappy Can you explain your workflow a bit more? Are you using Cloudron backups ? When you say import, are you importing from another cloudron using Cloudron backups or is this using some WordPress plugin?

          For getting the default SMTP credentials, you can open a Web Terminal and then type env | grep SMTP_PASSWORD.

          root@66b4ff23-928c-4b9e-b56c-dd65d54d35c5:/app/code# env | grep SMTP_PASSWORD
          CLOUDRON_MAIL_SMTP_PASSWORD=7c201bc456e6bf200aa0b25aeabb78e16e7d2daa48af0675
          

          The 7c201bc456e6bf200aa0b25aeabb78e16e7d2daa48af0675 above is the password.

          Z 1 Reply Last reply
          1
          • Z Offline
            Z Offline
            zappy
            wrote on last edited by
            #5

            UPDATE: I tried removing the plugin and restarting the container. It loads SMTP Mailer and puts in settings. But still, nothing sends mail.

            I also tried changing the container outbound SMTP to use mail relay with Mailgun. Restarted container. Still won't send.

            I ended up deactivating SMTP Mailer, installing WP Mail SMTP, put in the same mailgun settings and it all worked.

            Would still like to find a better way than just using another plugin.

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              zappy
              wrote on last edited by
              #6

              My workflow:

              • Customer wants me to host a website. Usually, it's hosted somewhere else or they have a backup file they send me.
              • Create new Cloudron Wordpress site.
              • Install whatever Wordpress backup/restore tool the client previously used.
              • Import the backup into the new Cloudron Wordpress site.

              So when that happens, it overwrites all the users, adds plugins, deactivates any plugin (like SMTP Mailer) that wasn't used by the original site, adds all the content, etc.

              It's after that SMTP Mailer just won't work. I'll "activate" it after a backup import, but it won't work. Same if I delete, restart and activate it again. Same if I change outbound to use relay.

              nebulonN 1 Reply Last reply
              0
              • Z zappy

                My workflow:

                • Customer wants me to host a website. Usually, it's hosted somewhere else or they have a backup file they send me.
                • Create new Cloudron Wordpress site.
                • Install whatever Wordpress backup/restore tool the client previously used.
                • Import the backup into the new Cloudron Wordpress site.

                So when that happens, it overwrites all the users, adds plugins, deactivates any plugin (like SMTP Mailer) that wasn't used by the original site, adds all the content, etc.

                It's after that SMTP Mailer just won't work. I'll "activate" it after a backup import, but it won't work. Same if I delete, restart and activate it again. Same if I change outbound to use relay.

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

                @zappy hm possibly some of those imported settings cause a side-effect for smtp mailer plugin?

                1 Reply Last reply
                0
                • girishG girish

                  @zappy Can you explain your workflow a bit more? Are you using Cloudron backups ? When you say import, are you importing from another cloudron using Cloudron backups or is this using some WordPress plugin?

                  For getting the default SMTP credentials, you can open a Web Terminal and then type env | grep SMTP_PASSWORD.

                  root@66b4ff23-928c-4b9e-b56c-dd65d54d35c5:/app/code# env | grep SMTP_PASSWORD
                  CLOUDRON_MAIL_SMTP_PASSWORD=7c201bc456e6bf200aa0b25aeabb78e16e7d2daa48af0675
                  

                  The 7c201bc456e6bf200aa0b25aeabb78e16e7d2daa48af0675 above is the password.

                  Z Offline
                  Z Offline
                  zappy
                  wrote on last edited by
                  #8

                  @girish said in smtp mailer config lost after restore from backup:

                  env | grep SMTP_PASSWORD

                  You rock!!! I'll try to reactivate SMTP Mailer later and see if using that password makes a difference. Regardless that's good info to have. Thanks.

                  1 Reply Last reply
                  0
                  • subvenS Offline
                    subvenS Offline
                    subven
                    wrote on last edited by
                    #9

                    @girish AFAIK passwords in environment variables change after restart (from what I remember regarding the LAMP app) so what is the point in hardcoding them into something like a plugin? You could use the variable for SMTP_PASSWORD in your config file though.

                    girishG 1 Reply Last reply
                    0
                    • subvenS subven

                      @girish AFAIK passwords in environment variables change after restart (from what I remember regarding the LAMP app) so what is the point in hardcoding them into something like a plugin? You could use the variable for SMTP_PASSWORD in your config file though.

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #10

                      @subven said in smtp mailer config lost after restore from backup:

                      @girish AFAIK passwords in environment variables change after restart (from what I remember regarding the LAMP app) so what is the point in hardcoding them into something like a plugin? You could use the variable for SMTP_PASSWORD in your config file though.

                      Assuming you mean the Cloudron part, the Cloudron environment variables are kept "constant" over the life cycle of an app. Initially, our idea was to change these periodically automatically for security but it seems people put the database values into into other apps which breaks. So, we didn't implement it.

                      As for putting it in the plugin, the smtp plugin we use reads the password from the database and does not use config.php - https://plugins.trac.wordpress.org/browser/smtp-mailer/trunk/main.php#L725 .

                      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