News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Don't want PM text in notification email

Started by saldali, November 10, 2005, 04:06:31 AM

Previous topic - Next topic

saldali

Title says all, notification email of new PM's contains the PM text. don't want that...

how can i fix this issue??

thank you

kriskd

I'd like to second this request.  This is the big item that is preventing me from using SMF.  For the novice user the PM notifications look like standard e-mails and it is so automatic for them to reply to it.  I'd like to know if this feature might be coming or if there are perhaps more topics on this subject (link please).  :)
SMF 2.0.2

kriskd

I think I just discovered this feature in SMF 1.1 RC2, namely:

"Don't allow post text in notifications?"

If this is true, I'm a pretty happy admin!!!!
SMF 2.0.2

H

If you don't like the way e-mails are sent out you can edit the relevant language file. I believe the file might be index.english.php
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

kriskd

Okay, I was wrong in my assumption about "Don't allow post text in notifications?".  This doesn't apply to the content of PM notifications.  So, my request still stands, I really need the option to not have the PM text in an e-mail notification because they look too much like a standard e-mail.

I understand I can beef up the language that tells the person not to reply, but is there anyway now to remove this content of the PM from the e-mail notification.  If it's just a matter of removing something from index.english.php, can someone tell me what that would be?  I am using SMF 1.1 RC2.

Thanks.
SMF 2.0.2

Oldiesmann

Themes/default/languages/PersonalMessage.english.php

Find
$txt[562] = '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';

Replace
$txt[562] = '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.';

Find
$txt['instant_reply'] = 'Reply to this Personal Message here:';

Add after that
$txt['instant_view'] = 'View this Personal Message here:';

Sources/Subs-Post.php

Find
$mailmessage .= "\n\n" . $txt['instant_reply'] . ' ' . $scripturl . '?action=pm;sa=send;f=inbox;pmsg=' . $ID_PM . ';quote;u=' . $from['id'];

Replace
$mailmessage .= "\n\n" . $txt['instant_view'] . ' ' . $scripturl . '?action=pm#' . $ID_PM;

That will remove the message text from the notification emails and will also change the last line to say "You can view this Personal Message here: {url}" (with {url} being a link to the message) instead of "You can reply to this Personal Message here: {url}" (with {url} being a link to reply to the message). Makes things a bit more convenient, since users will want to view the message before replying to it.
Michael Eshom
Christian Metal Fans

kriskd

Thanks for the code suggestions!  I'll have to see if I can get that going!

Sort of a dumb question -- these changes won't affect the users ability to request/recover a new password or anything, right?  I had done a modification with a different forum package and because of that, the user couldn't request a new password.
SMF 2.0.2

sbarnes

Excellant, thank you very much, works a treat.
Just tested the requesting a new passsord thing and that works as well.

Great job

Oldiesmann

Quote from: kriskd on May 16, 2006, 01:38:17 PM
Thanks for the code suggestions!  I'll have to see if I can get that going!

Sort of a dumb question -- these changes won't affect the users ability to request/recover a new password or anything, right?  I had done a modification with a different forum package and because of that, the user couldn't request a new password.

That's a completely different email message, so no it won't. :)
Michael Eshom
Christian Metal Fans

kriskd

Thanks Oldiesmann -- that worked perfectly for me as well!

Wish me luck people, I'll be launching my SMF forum either late Thursday or on Friday.  I think I got it working the way I want to!
SMF 2.0.2

lordg

I cant find this "Sources/Subs-Post.php"

Can you help with the exact location like the previous bit i.e Themes/language/english etc. Tried the search button etc.

Thanks in advance :)

Arantor

Sources/Subs-Post.php is the exact location. It doesn't live anywhere inside the themes area.

lordg

Thanks I found it and amended it but there were two similar posts called the same as you mention above. However still the message is displayed on the email about a PM ?

Thanks

JimM

There's only one that matches exactly as Oldiesmann posted it and if you change that one it should work fine.
Jim "JimM" Moore
Former Support Specialist

lordg

Sorry me again, whats the command to find the relevant text within the text document ?? Tried looking but no luck  :-[

Thanks

Arantor

So what package are you using open and edit the document?

lordg

Hi,

1.1.11 Found the file, then right clicked on the relevant file and clicked Edit.

Now have the file text open in front of me, I think there is a command which brings up a window where I can input the text and find the relevant line but I cannot remember what the command is ?

Thanks

Wizzlefits


Arantor

So... cPanel code editor? You could try using your browser's own find function (Ctrl-F) I suppose...

lordg

Yeah sorry thats what I am using.

In fact it seems I have already replace the text with

      $mailmessage .= "\n\n" . $txt['instant_view'] . ' ' . $scripturl . '?action=pm#' . $ID_PM;

But still PM's get text included ??


Advertisement: