Help with Welcome Emails

Post

Posted
Rating:
#6578 (In Topic #1711)
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’
Hello everyone,

I'm having some real difficulties figuring out how to get Welcome Emails to work.  I have newletters enabled, so the functionality for tempcode (or parameters) should work.  In particular, I would like to have the Welcome Email personalized so that the name (or firstname) will appear.

For example, I would like —

Dear {name},

to have the {name} parameter be changed to the name of the person receiving the email.  This is not happening.  It appears just as entered.  I would also like to have parameters for {username} and {password} filled in properly as well.  But again, no parameters are getting filled in…so I'm assuming they are not getting passed?

Another problem I'm noticing is that when I preview the body of the email, I am getting two error messages:
A language string is missing: NEWSLETTER_UNSUBSCRIBE_NEWSLETTER
A language string is missing: NEWSLETTER_UNSUBSCRIBE_MEMBER

I looked inside the newsletter.ini and these two language strings do exist, so I have no idea why I'm getting these messages.  But they are messing up the bottom of the emails where the user should be able to opt out of the subscription.  Any ideas why this is happening?

When previewing the Welcome email I am receiving the emails via SMTP but without the parameters variables being replaced.

Thanks in advance for any assistance you can offer.  Much appreciated.

Best,
Christopher
 

Last edit: by cwdean

Online now: No Back to the top

Post

Posted
Rating:
#6579
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi Christopher,

This looks like a bug, and possibly a misunderstanding. I'll look into it soon for you.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: Yes Back to the top

Post

Posted
Rating:
#6580
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’
Hi Chris,

Thanks for the quick response.  If there is anything I can do to help with testing any changes or fixes, please let me know.  I'm happy to help any way that I can.

I'm currently setting up my Homeowners Association community we site using Composr and was looking forward to using the Welcome Email capability to introduce new members to the site and provide them with a temporary password that they would need to change upon first log in.  That's the intent anyway :)

Thanks for you help and I look forward to hearing what you find out (or come up with as a fix).

Best regards,
Christopher

P.S.  Should I open a ticket for this?  Or do you have that covered?  Thanks again!
Online now: No Back to the top

Post

Important!
Posted
Rating:
#6588
Avatar
Site director
admin is in the usergroup ‘Administrators’

Automated fix message

cwdean said

Hello everyone,

I'm having some real difficulties figuring out how to get Welcome Emails to work.  I have newletters enabled, so the functionality for tempcode (or parameters) should work.  In particular, I would like to have the Welcome Email personalized so that the name (or firstname) will appear.

For example, I would like —

Dear {name},

to have the {name} parameter be changed to the name of the person receiving the email.  This is not happening.  It appears just as entered.  I would also like to have parameters for {username} and {password} filled in properly as well.  But again, no parameters are getting filled in…so I'm assuming they are not getting passed?

Another problem I'm noticing is that when I preview the body of the email, I am getting two error messages:
A language string is missing: NEWSLETTER_UNSUBSCRIBE_NEWSLETTER
A language string is missing: NEWSLETTER_UNSUBSCRIBE_MEMBER

I looked inside the newsletter.ini and these two language strings do exist, so I have no idea why I'm getting these messages.  But they are messing up the bottom of the emails where the user should be able to opt out of the subscription.  Any ideas why this is happening?

When previewing the Welcome email I am receiving the emails via SMTP but without the parameters variables being replaced.

Thanks in advance for any assistance you can offer.  Much appreciated.

Best,
Christopher
 
This issue has now been filed on the tracker as issue #4204, with a fix.
Important!

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#6589
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Sorry for these issues. I think people were not really utilising the variable substitution support in welcome e-mails or using the preview.

Whilst I was fixing all this I part-solved your issue needing to have passwords in there.
You can now do {m_pass_hash_salted}.
It will just give you the hash, but I'll discuss further in your other topic (Help with Account approval email - Composr).


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: Yes Back to the top

Post

Posted
Rating:
#6592
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’
This is fabulous.  Thanks Chris!

I've downloaded the hotfix and will check it out later today.
Online now: No Back to the top

Post

Posted
Rating:
#6598
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’
Chris, I applied the fix as instructed.  However, when testing I am getting the following error:

An error has occurred

A source code file is missing/corrupt/incompatible: cns_welcome_emails... "include() [<a href='http://php.net/manual/en/function.include.php'>function.include.php</a>]: Failed opening 'sources/cns_welcome_emails.php' for inclusion (include_path='.:/usr/local/php73/pear')" (sources/cns_welcome_emails.php or an overridden equivalent to this path) (version: 10.0.30, PHP version: 7.3.16, URL: /data/preview.php?page=admin_cns_welcome_emails&type=_edit)


Looks like code is looking for cns_welcome_emails.php in the sources folder.  I don't see any such file in that folder (not prior to updating or afterward.  The fix wants that file to be located in sources/hooks/systems/preview.

Any I overlooking something or done something incorrectly?  As far as I can tell, I've placed the files in the correct directories and ensured that permissions are still set properly (0644).  

Thoughts?
 
Online now: No Back to the top

Post

Posted
Rating:
#6599
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ah, sorry, it must have not made it into the hot-fix.
It's here and I'll update the fix.

https://gitlab.com/composr-foundation/composr/-/raw/master/sources/cns_welcome_emails.php


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: Yes Back to the top

Post

Posted
Rating:
#6601
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’

Ah, sorry, it must have not made it into the hot-fix.
It's here and I'll update the fix.

https://gitlab.com/composr-foundation/composr/-/raw/master/sources/cns_welcome_emails.php


That fixed it :)

Quick question: the fix now looks like this, which is fine:

You are receiving this newsletter because you have a member account set to “Receive newsletters and other site updates”. You can change your settings at: https://torhoa.org/site/index.php?page=members&type=view#tab__edit

I don't see that option on Edit/Settings tab.  And since this is a Welcome email, the term 'newsletter' may be confusing.  I don't think it's that big a deal, but the link to change your settings probably needs to be clear.  Is that link correct?  because I'm not seeing "Receive newsletters and other site updates" there.
 
Online now: No Back to the top

Post

Important!
Posted
Rating:
#6603
Avatar
Site director
admin is in the usergroup ‘Administrators’

Automated fix message

cwdean said


Ah, sorry, it must have not made it into the hot-fix.
It's here and I'll update the fix.

https://gitlab.com/composr-foundation/composr/-/raw/master/sources/cns_welcome_emails.php


That fixed it :)

Quick question: the fix now looks like this, which is fine:

You are receiving this newsletter because you have a member account set to “Receive newsletters and other site updates”. You can change your settings at: https://torhoa.org/site/index.php?page=members&type=view#tab__edit

I don't see that option on Edit/Settings tab.  And since this is a Welcome email, the term 'newsletter' may be confusing.  I don't think it's that big a deal, but the link to change your settings probably needs to be clear.  Is that link correct?  because I'm not seeing "Receive newsletters and other site updates" there.
 
This issue has now been filed on the tracker as issue #4210, with a fix.
Important!

Post

Posted
Rating:
#6607
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’
Thank-you!

If the only correction made was to add the "sources/cns_welcome_emails.php" file then I was able to download that file from gitlab and apply.  That definitely fixed the Error I was getting.

However, I am now not receiving any Welcome emails  :( .  This may not be related to the apply fix but it is definitely something I am now experiencing.  It worked the first time which is how I was able to report the original language string errors, but after creating a second account (with the latest fixes) I  did not receive the Welcome email.  I did receive the Validation email after validating, however.

Does the Welcome email require the new account to be pre-validated in order to be sent?  Trying to figure out how I got it to work the first time but not the second.  Any thoughts or suggestions?

Thanks for all your  help!
Online now: No Back to the top

Post

Important!
Posted
Rating:
#6612
Avatar
Site director
admin is in the usergroup ‘Administrators’

Automated fix message

cwdean said

Thank-you!

If the only correction made was to add the "sources/cns_welcome_emails.php" file then I was able to download that file from gitlab and apply.  That definitely fixed the Error I was getting.

However, I am now not receiving any Welcome emails  :( .  This may not be related to the apply fix but it is definitely something I am now experiencing.  It worked the first time which is how I was able to report the original language string errors, but after creating a second account (with the latest fixes) I  did not receive the Welcome email.  I did receive the Validation email after validating, however.

Does the Welcome email require the new account to be pre-validated in order to be sent?  Trying to figure out how I got it to work the first time but not the second.  Any thoughts or suggestions?

Thanks for all your  help!
This issue has now been filed on the tracker as issue #4211, with a fix.
Important!

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#6613
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Your suspicion was correct, it does respect validation.
I've implemented above a special case whereby immediate welcome e-mails will now ignore validation, as obviously staff can't handle validation in a zero time span.
Otherwise, the behaviour is now documented.

That said…

We have been discussing implementing the feature to simply send out an e-mail when you add the member, which hopefully bypasses any need for these kinds of welcome e-mail or validation e-mail workarounds.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: Yes Back to the top

Post

Posted
Rating:
#6617
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’

Chris Graham said

Your suspicion was correct, it does respect validation.
I've implemented above a special case whereby immediate welcome e-mails will now ignore validation, as obviously staff can't handle validation in a zero time span.
Otherwise, the behaviour is now documented.

That said…

We have been discussing implementing the feature to simply send out an e-mail when you add the member, which hopefully bypasses any need for these kinds of welcome e-mail or validation e-mail workarounds.


Thanks for confirming my suspicion.  I'm glad you implemented a special case as I did find that behavior unusual, because as you state, 'staff can't handle validation in a zero time span'.  is that 'fix' available for download?

Yes, we are definitely continuing to work out the details for sending an email when you add a member (see my latest response).
Online now: No Back to the top

Post

Posted
Rating:
#6619
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: Yes Back to the top

Post

Posted
Rating:
#6625
Avatar
Standard member
cwdean is in the usergroup ‘Fan in action’

Chris Graham said


Perfect.  Thanks Chris.  I'll check this out shortly.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

gabriel58, Chris Graham, Vaiva, babu, amit.nigam, ManojSree, John Connor, Paul D

Forum statistics:
  • 1,214 topics, 5,700 posts, 6,857 members
  • Our newest member is Ektasharma
Birthdays:
Back to Top