0.1.5

Pretty Mail does not work with formatted post content in beta 9, fixed in beta 10 with flarum/core1848.

  • !! Requires Flarum beta 10
  • Fix post content not showing in the 3 specific email templates
    • to update, reset all templates to the default
    • OR change $blueprint->post->contentHtml to $blueprint->post->formatContent() in all 3 templates

Updating

composer update fof/pretty-mail

    datitisev
    hey i have installed this updated ones so
    when new user signup it throws 400 post error
    and says opps try again and reload
    so when i check mail ther is registration mail message
    and in log error no any errors found
    so but when trying signup it throws 400 error while seeing on console and says oops try again with red highliting

    @datitisev Can I modify sign up mail? The confirmation mail is English and I want to translate it to another language but pretty mail has no this option.

      fakruzaruret Not as of now; in the future the extension will probably be updated so it supports any template and the user can add & change whichever email template they want.

      I wanted to change the font size for the received emails in gmail. The only way it changes in gmail is by adding this in the templates:

      .content {font-size: 20px; }

      @datitisev There seems to be some minor bug by which two different users receive the same email from Follow Tags of of the same new post with different formatting in gmail. One of them has the correct css appearance, the second one has more line spaces and no header background color all of which is shown correctly in the first one. I deleted a test user and signed up with a new one to check if it is an issue with old users but still this issue persists. I can send screenshots if needed. Thanks.

        nitaaikumar Uh... I don't know if I can really do anything about this. The template is the same for everyone - the only thing that changes is the Hey <display name>.

        4 days later

        Pretty Mail does not support the Flagrow Upload extension so the emails of new discussions received in gmail show the upload code: [upl-image-preview url=https://myflarumsite.com/image.jpg] instead of the actual image.

        I was using the Subscribed extension option to receive all discussions by email and Pretty Email together as an email newsletter option. So if this issues with the upl code can be fixed, it will be great @datitisev.

        If I replace the upl code with the normal img bbcode, will it show up in the pretty emails in gmail?

          nitaaikumar I don't think that's really an option. The content that is put on the email for new posts is the formatted content... so technically it should already be formatted. Not sure if this is a pretty mail issue or an upload issue...

          7 days later

          [deleted] which notification is that ? If there's no <a> tag in the original code, it looks like something we'd want to fix in Flarum.

          Without <a> tag, it's the mail client that decides if it wants to auto-link something, and it looks like your particular mail client stops before the /.

          [deleted] just replace it with this
          <p><a href="{!! $baseUrl !!}/d/{!! $blueprint->post->discussion_id !!}/{!! $blueprint->post->number !!}">{!! $baseUrl !!}/d/{!! $blueprint->post->discussion_id !!}/{!! $blueprint->post->number !!}"></a></p>

          in https://YOUR_URL/admin#/fof/pretty-mail

          a month later

          datitisev please can you confirm this? I can't find strings in Linguist extension for email subjects.

            hrvoje_hr Oh, sorry. Subjects aren't currently translatable in core. This extension does not change that.

              • [deleted]

              datitisev Well apparently i can change the email messages using linguist?

                [deleted] What email messages? I'm pretty sure core email messages aren't translatable either. Some extensions may have made their content translatable.

                [deleted] Oh, I didn't realize that email was translatable. Looks like only a few core emails are. But that is explicitly coded. Currently, you can't translate the email subjects.

                • [deleted]

                • Edited

                Anyone else seeing this in their logs ?

                [Tue Nov 26 17:05:02.945499 2019] [proxy_fcgi:error] [pid 78117:tid 140489923753728] [client 77.68.89.92:55970] AH01071: Got error 'PHP message: PHP Warning: scandir(/var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/fof/pretty-mail/src/Overrides/../../../../public/assets/): failed to open dir: No such file or directory in /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/fof/pretty-mail/src/Overrides/NotificationMailer.php on line 68
                PHP message: PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/fof/pretty-mail/src/Overrides/NotificationMailer.php on line 68
                PHP message: PHP Warning: preg_grep() expects parameter 2 to be array, bool given in /var/www/vhosts/phenomlab.com/forum.phenomlab.com/vendor/fof/pretty-mail/src/Overrides/NotificationMailer.php on line 68'

                5 days later

                Hope to add custom style support for these four email notifications.

                2 months later
                • [deleted]

                Any chance that this extension can integrate properly with @clarkwinkelmann WordPress extension ? Currently, the email body is blank on all emails.

                  [deleted] I believe it's not an issue with Pretty Mail. It's an issue with Follow Tags. The mail body is already blank before Pretty Mail tries to handle it. I have created an issue in Follow Tags but it will require either a hard-coded rule for the Wordpress extension, or a change in core to allow other types of posts to be converted to HTML FriendsOfFlarum/follow-tags7

                  EDIT: or do really ALL emails are blank, including those about replies ?

                    7 days later

                    [deleted] I have dome some tests and I'm not sure I experience everything you've described.

                    From my tests:

                    • Pretty Mail has nothing to do with the issue. It happens whether Pretty Mail is enabled or not.
                    • Posts about new discussions from fof/subscribed output a Warning: htmlspecialchars() expects parameter 1 to be string, array given.
                    • Posts about new discussions from fof/follow-tags output a Notice: Array to string conversion.
                    • Every other notification works fine.
                    • In no case do I experience blank emails. If warnings and notices are hidden, the post body is simply missing, but everything else is visible.

                    Is this what you observe ?

                    The issue in subscribed and follow tags is FriendsOfFlarum/follow-tags7 and I think a solution should be introduced through core. Maintaining custom code for compatibility with the Wordpress extension in those two extensions is too difficult.

                      • [deleted]

                      clarkwinkelmann Is this what you observe ?

                      Yes. Exactly that. The issue doesn't issue occur with posts generated directly in Flarum though - only the WordPress generated posts

                        a month later

                        ok, thank you. i am asking for this extension on freeflarum

                        22 days later
                        • [deleted]

                        [deleted] Yes. Exactly that. The issue doesn't issue occur with posts generated directly in Flarum though - only the WordPress generated posts

                        Circling back here as I now have this issue with posts created directly in Flarum (well, with the API). When someone replies to a thread I'm following, the body of their response is missing.

                          • [deleted]

                          • Edited

                          [deleted] Circling back here as I now have this issue with posts created directly in Flarum (well, with the API). When someone replies to a thread I'm following, the body of their response is missing.

                          Confirmed bug in Pretty Mail. When enabled, the body of the message (the post itself) is missing. With the extension disabled, everything works as expected.

                          Can this be looked at ? I quite like the idea of mail branding but at the moment, I cannot use it.

                          Thanks

                            [deleted] are you able to DM me an example email? Please also include any relevant metadata/message details so I can inspect what data isn't being sent and what's actually being sent. Dummy data is much preferred if you are concerned about privacy 🙂 I'll also try to replicate locally in the meantime.

                            • [deleted]

                            • Edited

                            @Ralkage @Kyrne @clarkwinkelmann by way of an update, I can now confirm that this extension is suddenly working after applying updates for

                            v17development-seo
                            fof/sitemap
                            fof-pages
                            flarumalshain/slowlastpost

                            One of these updates, and I don't know which, has meant that fof-pretty-mail is now working as intended. Perhaps something in the above was preventing this from functioning properly.

                            9 days later

                            I get 500 Server error after I installed this extension.
                            I did remove the extension using the composer remove, but even then the website does not work.

                            Please let me know what I can do.

                              9 days later

                              Great extension! Is it possible to change the forum title at the top of the mail (<a href="{{ $baseUrl }}">{{ $settings->get('forum_title') }}</a>) to the logo?

                              Additionally, is there any way to replace the link in the email (for example the confirmation link that appears for new members when they sign up) with a button? If it can't be done through the extension, where can I find the files to implement that?

                                6 days later
                                • [deleted]

                                Hello, how would i test the default template? I want that it sends me an email