bramwolf Posted June 4, 2019 Share Posted June 4, 2019 Hi Guys, Just installed and tested the module and my email came out like this: Any ideas on how to fix this? Thanks in advance ? Link to comment Share on other sites More sharing options...
adrian Posted June 4, 2019 Author Share Posted June 4, 2019 @bramwolf - does it make a difference if you use a different email client? What are you using? Link to comment Share on other sites More sharing options...
bramwolf Posted June 4, 2019 Share Posted June 4, 2019 Hi Adrian, I don't think so, got the same formatting on Apple mail and android Grts Bram Link to comment Share on other sites More sharing options...
adrian Posted June 4, 2019 Author Share Posted June 4, 2019 49 minutes ago, bramwolf said: I don't think so, got the same formatting on Apple mail and android What about the email provider? Can you try to a gmail address to confirm the problem? Link to comment Share on other sites More sharing options...
bramwolf Posted June 5, 2019 Share Posted June 5, 2019 I tried it with a Gmail account but got the same results. It's like the header isn't configured properly? the encoding type should be sent as a header not as the message. However I don't know why that is happening or where I could change it.. ? Link to comment Share on other sites More sharing options...
adrian Posted June 5, 2019 Author Share Posted June 5, 2019 2 hours ago, bramwolf said: I tried it with a Gmail account but got the same results. It's like the header isn't configured properly? the encoding type should be sent as a header not as the message. However I don't know why that is happening or where I could change it.. ? Are other html emails from your system (sent with a wireMail) working as expected? In other words, is it only emails from this module that are the problem? Link to comment Share on other sites More sharing options...
bramwolf Posted June 5, 2019 Share Posted June 5, 2019 I checked a email from the frombuilder and got the same result. I never had this problem before with any other processwire sites I have. Any ideas on what could cause it? Thanks in advance ? Link to comment Share on other sites More sharing options...
gerritvanaaken Posted January 28, 2020 Share Posted January 28, 2020 Is it possible to have different welcome messages for different User-Roles? I use the module via API. Maybe it’s possible to manually choose an email template file for each welcome message, something like this: $u = new User(); $u->name = "foo"; $u->pass = randomPassword(); $u->sendEmail = true; $u->welcomeMessageFile = '/some/path/client.txt'; $u->save() My client has a bunch of different user types that need a variety of welcome texts. Any idea how I could accomplish that? Link to comment Share on other sites More sharing options...
adrian Posted January 28, 2020 Author Share Posted January 28, 2020 Hi @gerritvanaaken - please grab the latest version just committed and use: $u->emailMessage = 'My custom message'; Obviously you can wrap this in a conditional and define it differently for each required role. I think the idea of a template file could also be good and am certainly not against implementing it - this was just quicker to do for now ? Perhaps if you still want the file approach, you'd be willing to put together a PR? Link to comment Share on other sites More sharing options...
adrian Posted January 28, 2020 Author Share Posted January 28, 2020 Actually, the problem with the template file setup is handling multi-language version of the message body. I am thinking that perhaps I'll add a new collapsed fieldset to the module settings that has a field for each role (complete with multi-language support, as the current main "Email Body" field has). Any thoughts on this approach? Link to comment Share on other sites More sharing options...
gerritvanaaken Posted January 28, 2020 Share Posted January 28, 2020 Wow, @adrian – that looks good, it might be exactly what I need for my client. I’ll chedk this out in the next few days. Do you have a small hint in which format I set line breaks? $u->emailMessage = "Hello {name}\n\nwelcome to the show"; or better this way? $u->emailMessage = 'Hello {name} welcome to the show'; 1 Link to comment Share on other sites More sharing options...
adrian Posted January 28, 2020 Author Share Posted January 28, 2020 Just now, gerritvanaaken said: Do you have a small hint in which format I set line breaks? I would go with double quotes and \n Link to comment Share on other sites More sharing options...
gerritvanaaken Posted January 28, 2020 Share Posted January 28, 2020 4 hours ago, adrian said: Actually, the problem with the template file setup is handling multi-language version of the message body. I am thinking that perhaps I'll add a new collapsed fieldset to the module settings that has a field for each role (complete with multi-language support, as the current main "Email Body" field has). Any thoughts on this approach? One field for each role could cause problems, because a new user might have more than one role. Then: which message do you send? All of them? You would need some complicated conditional logic in the UI. Not all that easy. 2 Link to comment Share on other sites More sharing options...
Kiwi Chris Posted July 27, 2020 Share Posted July 27, 2020 I'm having an issue with PW 3.0.163 and this module 1.1.12 where the initial option to send welcome message is not present, however the 'Re-send welcome message' option is present after saving a user. I think I used an earlier version of the module that didn't require the user to have the permission edit-profile, and that worked OK. I think the permission profile-edit is not being set until after the user is already published, so the initial option to send the welcome message is never shown. Link to comment Share on other sites More sharing options...
adrian Posted July 27, 2020 Author Share Posted July 27, 2020 Sorry about @Kiwi Chris - I didn't consider that on initial user creation, extra roles won't have been checked yet. I have removed that profile-edit requirement to show the email field, although I added a showIf check to make sure at least one additional role (not just guest) has been checked. After all, if we're going to email someone their password, they need to be able to edit their profile to change it. Let me know if this version seems OK to you. Link to comment Share on other sites More sharing options...
Kiwi Chris Posted July 27, 2020 Share Posted July 27, 2020 @adrian Thanks, that's working as expected again now. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now