No Code Attached Yet
avatar PhilETaylor
PhilETaylor
9 Jun 2020

Steps to reproduce the issue

Send a private message to another Joomla 4 super admin

Screenshot 2020-06-09 at 19 07 34

Look at the email received.

Expected result

Expected that the subject typed would appear in the subject of the email notification

Actual result

Email has a subject of: New Message from admin at Test

Raw message source

Content-Type: text/plain; charset=utf-8
Date: Tue, 9 Jun 2020 18:07:38 +0000
From: Test <phil@phil-taylor.com>
MIME-Version: 1.0
Message-ID: <WeV6UARGsy8Yw86rG0kvDxbPaO8hoalql0OiDMRHf4@localhost.localdomain>
Received: from localhost.localdomain by mailhog.example (MailHog)
          id 32qc9H2sSudK-uPuNWmjwvpirpFTTsgjYoLBuLM30Hk=@mailhog.example; Tue, 09 Jun 2020 18:07:38 +0000
Reply-To: admin <phil@phil-taylor.com>
Return-Path: <phil@phil-taylor.com>
Subject: New Message from admin at Test
To: test <test@phil-taylor.com>

This is my subject 

This is my message

Please log in to http://127.0.0.1/administrator/index.php?option=com_messages&view=message&message_id=2 to read your message.

The help screen for this page simply says

Subject. The subject of the message. Just like the subject of an email, it helps if this is a short description of the message body.

which doesn't make it clear if the subject will be mapped to the email subject or not.

This might be a won't fix but nethertheless confusing ...

avatar PhilETaylor PhilETaylor - open - 9 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jun 2020
avatar PhilETaylor PhilETaylor - change - 9 Jun 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 9 Jun 2020
avatar infograf768
infograf768 - comment - 10 Jun 2020

@PhilETaylor
Code is

$subj	  = sprintf($lang->_('COM_MESSAGES_NEW_MESSAGE'), $fromName, $sitename);
$msg 	  = $subject . "\n\n" . $message . "\n\n" . sprintf($lang->_('COM_MESSAGES_PLEASE_LOGIN'), $siteURL);

I guess we could do

$subj	  = sprintf($lang->_('COM_MESSAGES_NEW_MESSAGE'), $fromName, $sitename) . ' - ' . $subject;
$msg 	  = $message . "\n\n" . sprintf($lang->_('COM_MESSAGES_PLEASE_LOGIN'), $siteURL);

This would give:
Message-2020-06-10-at-11 58 01

What do you think?

avatar PhilETaylor
PhilETaylor - comment - 10 Jun 2020

Personally, I dont see a need for the string COM_MESSAGES_NEW_MESSAGE as you

  1. know its a new message....
  2. You know who its from - as they name/email is in the from
  3. You know which site it is, because you get a URL to the site

also the "Please login in to...." is also redundant, because you dont need to "log in to read your message" as WE JUST SENT YOU THE WHOLE MESSAGE above that link....

avatar brianteeman
brianteeman - comment - 10 Jun 2020

Most of that is just legacy stuff from before the PR that made com_messages useful

avatar infograf768
infograf768 - comment - 10 Jun 2020

New is indeed useless.

You know who its from - as they name/email is in the from

One would not know who exactly send you the message, in my case above "otheradmin". The site email may not reflect the site name.

You know which site it is, because you get a URL to the site
The url to the site does not use the name of the site, therefore it may be useful to display it.

also the "Please login in to...." is also redundant, because you dont need to "log in to read your message" as WE JUST SENT YOU THE WHOLE MESSAGE above that link....

Indeed, it should not be to read, but rather to access (or similar) as the user may need to change the status of the message to Read or just trash it.

avatar brianteeman
brianteeman - comment - 24 Feb 2022

Personally, I dont see a need for the string COM_MESSAGES_NEW_MESSAGE as you

  1. know its a new message....
  2. You know who its from - as they name/email is in the from
  3. You know which site it is, because you get a URL to the site

also the "Please login in to...." is also redundant, because you dont need to "log in to read your message" as WE JUST SENT YOU THE WHOLE MESSAGE above that link....

There have been some changes since this issue was first raised as the message no longer contains the legacy line "please log in to.." great -

I am going to propose a PR to change the title to
-

This will allow you to filter your incoming mails based on the sitename etc

avatar Quy Quy - change - 24 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-24 15:03:37
Closed_By Quy
Labels Added: No Code Attached Yet
Removed: ?
avatar Quy Quy - close - 24 Feb 2022
avatar Quy
Quy - comment - 24 Feb 2022

Please test PR #37133. Thanks.

Add a Comment

Login with GitHub to post a comment