News:

Wondering if this will always be free?  See why free is better.

Main Menu

PM notification - how to remove PM text from email?

Started by landyvlad, June 27, 2018, 07:55:41 PM

Previous topic - Next topic

landyvlad

Members can have their profiles set such that they receive notifications when they get a Private Message.
At the moment this notification includes the text of the private message. 

Naturally many members (no matter how many times they are told) just hit 'reply' on the email, which then of course goes to the admin, and is very annoying.

In Admin - Configuration - General there is a checkbox for  "Do not allow post text in notifications" which I have checked.

The explanation of this field states:
QuoteThis will remove the option of receiving the text of replies and posts in notification emails.
Members will often reply to the notification email which in most cases means the webmaster receives the reply.

Perhaps this only replies to post/topic notifications and not to private messages?

I assume this because a day or so after I made that change (checking that box and saving) I saw another 'replied to' PM email notification, which included the text of the PM.

Can someone please steer me in the right direction as far as how to ensure the text of private message is NOT included in the email notification.

Thanks
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Sir Osis of Liver

PersonalMessage.english.php

Find this -



// Don't translate SENDER or MESSAGE in this language string; they are replaced with the corresponding text - use numeric entities too.
$txt['pm_email'] = 'You have just been sent a personal message by SENDER on ' . $context['forum_name'] . '.' . "\n\n" . 'IMPORTANT: Remember, this is just a notification. Please do not reply to this email.' . "\n\n" . 'The message they sent you was:' . "\n\n" . 'MESSAGE';
$txt['pm_multiple'] = '(multiple recipients: \'name1, name2\')';



Change to this -



// Don't translate SENDER or MESSAGE in this language string; they are replaced with the corresponding text - use numeric entities too.
$txt['pm_email'] = 'You have just been sent a personal message by SENDER on ' . $context['forum_name'] . '.' . "\n\n" . 'IMPORTANT: Remember, this is just a notification. Please do not reply to this email.';
$txt['pm_multiple'] = '(multiple recipients: \'name1, name2\')';


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

As far as I'm aware, that setting should work for PM notifications too. But, you may see some bounces for a few days even - because mail queues can delay them, and even without that not all mail is abandoned and bounced immediately by all servers if they fail to deliver.

You may also be seeing mail that is just the original recipient replying to a notification through email, if the notification is sent from the address you received it to. This can happen as long as people have old notifications in their inbox.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

landyvlad

Thanks Sir Osis

Thanks Aleksi.

I suppose I'll wait for a week or so and see if it stops happening. If not I'll investigate along the suggested lines Sir Osis.

Ta muchly.

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

aegersz

i have been down this path myself.

i had to eventually setup an auto-reply (the 'vacation' emailer in Linux) to tell them that 'webmaster' was the recipient (and not who sent the PM) and to 'not do it' as it would NOT BE SEEN by the intended recipient.

i still find mail in webmaster though.

if you have a hosted system then of course, this is not so practical.

try emailing a test message to webmaster at my site and you will see what i mean.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Kindred

Why would that noT be practical on a hosted system?

I have several hosted systems and I can set up my mail system to do that
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

aegersz

i thought that on hosted systems it was added expense and that email was a send only process where you config SMF for a SMTP proxy.

my problem is that i don't know the true limitations of hosted systems and on my server i can install whatever i like ~ something hosted systems make difficult.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

a10

Quote from: landyvlad on June 28, 2018, 08:03:41 PM
I suppose I'll wait for a week or so and see if it stops happening. If not I'll investigate along the suggested lines Sir Osis.

The "Don't allow post text in notifications" does not stop PM text. A mod would be good, as it's a regular problem for many.
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

GigaWatt

Maybe this could be added in "Tips and Tricks" ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Aleksi "Lex" Kilpinen

Quote from: a10 on June 29, 2018, 03:26:13 AM
Quote from: landyvlad on June 28, 2018, 08:03:41 PM
I suppose I'll wait for a week or so and see if it stops happening. If not I'll investigate along the suggested lines Sir Osis.

The "Don't allow post text in notifications" does not stop PM text. A mod would be good, as it's a regular problem for many.

Really? I really thought it did. Yeah, if it does not stop PM text - then yes, the edit by Sir Osis seems the right course of action, and this really could use a mod too. Simple as it is.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

landyvlad

I presume 2.1 is the same?

Perhaps something for inclusion in a future 2.1 update (in due course).

I have no idea how to use github so perhaps someone on there could raise this please?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

landyvlad

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Aleksi "Lex" Kilpinen

OK, so I did raise this for discussion. And the first reply I got was that the setting should work for PMs too. Can someone verify this is not the case? For 2.1 already :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

GigaWatt

Yes, for 2.1 it does work ;). Haven't tested it for 2.0 though.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

landyvlad

Sir Osis I made the changes suggested, not only to PersonalMessage.english.php but also to two similarly named files - one british english and one UTF-8 - as I'm not sure what one the forum is ACTUALLY using.

I commented out the old portion (so I could change back if needed) and added the code block you provided.

I then tested it by sending a PM to myself and got a notification without the text in it.  Great, I thought, it works.

HOWEVER

Another admin has said that while he does have his profile set to receive notifications, and has done in the past, he is no longer receiving ANY notification of PM's at all, since I did this.

Any idea what I may have done wrong please?




"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Illori

attach the files to your next post.

also check in your profile which language you have selected and which the other admin has selected.

Kindred

chances are: when you made the edits, you missed the closing quote -- or added a quote or other character without escaping.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

landyvlad

Illori - sorry I didn't see this til now, at work again.  When I next get a chance I'll do precisely that.
Oh, language for all of us is English British.

Kindred - I reckon you are likely correct. Especially as I didn't do a direct cut and replace, but rather 'commented out' the existing code (so I could reinstate later if needed) and then pasted in the new code afterward.
Wouldn't be at all surprised if I inadvertently commented out something important :D
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

Files attached (I believe I made the same changes in all three).
I think.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Advertisement: