Skip to Content Skip to Menu

[#5273] SEND A MESSAGE VIA EMAIL

  • MAYASIMA
  • MAYASIMA
  • OFFLINE
  • Posts: 183
  • Thanks: 22
  • Karma: 5
9 years 1 week ago - 9 years 1 week ago #264313 by MAYASIMA
Replied by MAYASIMA on topic SEND A MESSAGE VIA EMAIL

The From Name can be a language string. So can the subject and body as they're all visible to the recipient as strings so allowing translation of them makes sense.

What I meant to say is that I do not think that that particular language string, 'REGISTRATION_EMAIL_FROM_NAME', is intended to be used by the user's email form.

I'm not seeing this in any of my tests. It should be the users name and not the from name substitution. Example as follows.

demouser @ MySite

This is hardcoded directly into the notification API as long as $revealEmail is set to true, which it's forced to for the email form. Was CBs core code modified in any way? The only issue I can confirm is email not substituting in.

Core is not modified.

I went back to research this whole issue from scratch and after I spent the entire weekend on it, I found out that this issue is being caused by the selected setting of the "Name Format" in the CB General Configuration settings. Here is what happens depending on the settings you choose.

When "Emails Sent From" is set to "Admin Email Address, with Reply-To- User Email Address" and "Name Format" is set to "Username Only"the following is generated:

Subject:
Code:
[SUBJECT]
From:
Code:
[USERNAME] @ [SITENAME]
Body:
Code:
------- This is a message from [USERNAME] at [SITENAME]([SITEURL]) to you: ------- When replying, please check carefully that the email address of [USERNAME] is .[MESSAGE] ------ NOTES: ------ This user did not see your email address. If you reply the recipient will have your email address. SITENAME owners cannot accept any responsibility for the contents of the email and of user email addresses.

When "Emails Sent From" is set to "Admin Email Address, with Reply-To- User Email Address" and "Name Format" is set to "Name Only"the following is generated:

Subject:
Code:
[SUBJECT]
From:
Code:
[REGISTRATION_EMAIL_FROM_NAME] @ [SITENAME]
Body:
Code:
------- This is a message from [REGISTRATION_EMAIL_FROM_NAME] at [SITENAME]([SITEURL]) to you: ------- When replying, please check carefully that the email address of [REGISTRATION_EMAIL_FROM_NAME] is .[MESSAGE] ------ NOTES: ------ This user did not see your email address. If you reply the recipient will have your email address. SITENAME owners cannot accept any responsibility for the contents of the email and of user email addresses.

When "Emails Sent From" is set to "Admin Email Address, with Reply-To- User Email Address" and "Name Format" is set to "Name (Username)"the following is generated:

Subject:
Code:
[SUBJECT]
From:
Code:
[REGISTRATION_EMAIL_FROM_NAME] ([USERNAME]) @ [SITENAME]
Body:
Code:
------- This is a message from [REGISTRATION_EMAIL_FROM_NAME] ([USERNAME]) at [SITENAME]([SITEURL]) to you: ------- When replying, please check carefully that the email address of [REGISTRATION_EMAIL_FROM_NAME] ([USERNAME]) is .[MESSAGE] ------ NOTES: ------ This user did not see your email address. If you reply the recipient will have your email address. SITENAME owners cannot accept any responsibility for the contents of the email and of user email addresses.

When "Emails Sent From" is set to "Admin Email Address, with Reply-To- User Email Address" and "Name Format" is set to "Username (Name)"the following is generated:

Subject:
Code:
[SUBJECT]
From:
Code:
[USERNAME] ([REGISTRATION_EMAIL_FROM_NAME]) @ [SITENAME]
Body:
Code:
------- This is a message from [USERNAME] ([REGISTRATION_EMAIL_FROM_NAME]) at [SITENAME]([SITEURL]) to you: ------- When replying, please check carefully that the email address of [USERNAME] ([REGISTRATION_EMAIL_FROM_NAME]) is .[MESSAGE] ------ NOTES: ------ This user did not see your email address. If you reply the recipient will have your email address. SITENAME owners cannot accept any responsibility for the contents of the email and of user email addresses.

Please check this and let me know if there is a workaround to resolve this issue. I need to be able to use the Name Only as the Format Name.
Last edit: 9 years 1 week ago by MAYASIMA.
The following user(s) said Thank You: beat

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 47893
  • Thanks: 8155
  • Karma: 1434
9 years 1 week ago #264334 by krileon
Replied by krileon on topic SEND A MESSAGE VIA EMAIL
Ok, so there's an issue with the name and email substitutions not working properly. It's likely pulling those values from the email user object that's constructed and is overriding the values in the user object. Have noted this in the bug ticket.

The substitutions are done in _replaceVariables of libraries/CBLib/CB/Legacy/cbNotification.php, but the issue is coming from outside that function as $row->name is being replaced much earlier in the process.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MAYASIMA
  • MAYASIMA
  • OFFLINE
  • Posts: 183
  • Thanks: 22
  • Karma: 5
9 years 1 week ago #264701 by MAYASIMA
Replied by MAYASIMA on topic SEND A MESSAGE VIA EMAIL
What is the from name suppose to be when sending moderator emails to the user and moderator (for example when an image is submitted for approval)?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 47893
  • Thanks: 8155
  • Karma: 1434
9 years 4 days ago #264751 by krileon
Replied by krileon on topic SEND A MESSAGE VIA EMAIL
Well the [name] substitution is always supposed to be the name of the user. The from name in the email is dependent on who it's being sent from. If it's sent from the site the from name should be REGISTRATION_EMAIL_FROM_NAME otherwise it should be the users name.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: beat

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn