MyBB Community Forums

Full Version: Pm aleart with message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I want subject & content of the pm to be sent through mail to the respective user.

As of now the default system sends message as there is a pm waiting so visit site and check it out, in that mail itself I need to send subject & content of the pm received.

How can I do it ?
no help Sad
helloooooooo

Any body please help
If you want to send subject and message within the mail, why not using the e-mail-form directly?
I guess you didnt understand what I wanted,

Now there is a automated function built-in mybb, when somebody gets a pm a mail is sent automatically to the user. I want the subject & message of the pm also to be sent in that pm itself.
I unterstand you. So if you want to send subject and complete message directly within the e-mail I see no reaon to send it as a pm. You can simply use the MyBB build in function to send a user an e-mail...
File Edits: 4

**

Open ./inc/languages/english/messages.php

Find
$l['emailsubject_newpm'] = "New Private Message at {1}";

Change into
$l['emailsubject_newpm'] = "New Private Message at {1} - {2}";

** {2} While represent the PM Subject **


Change the whole $l['email_newpm'] language string into
$l['email_newpm'] = "{1},
		
You have received a new private message on {3} from {2} That goes like this:

------------------------------------------
{5}
------------------------------------------

To view this message, you can follow this link:

{4}/private.php

Please note that you will not receive any further notifications of new messages until you visit {3}.

You can disable new message notifications on your account options page:

{4}/usercp.php?action=options

Thank you,
{3} Staff
{4}";

** {5} Will Represent The PM Message, Can Become Messy If There Are Tags Involved, Use At Own Risk **

Open ./inc/datahandlers/pm.php

Find
$emailmessage = $lang->sprintf($emailmessage, $recipient['username'], $pm['sender']['username'], $mybb->settings['bbname'], $mybb->settings['bburl']);

Change Into
$emailmessage = $lang->sprintf($emailmessage, $recipient['username'], $pm['sender']['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $pm['message']);

Find
$emailsubject = $lang->sprintf($emailsubject, $mybb->settings['bbname']);

Change Into
$emailsubject = $lang->sprintf($emailsubject, $mybb->settings['bbname'], $pm['subject']);


Should result into [attachment=18961]
wow..thanks, Lex. been wanting this for quite some time.
Hats off to Lex.

It worked perfect as expected.

Just one small correction the file name is /inc/languages/english/messages.lang.php not /inc/languages/english/messages.php

Rest everything is fine. Thanks for the help Smile
I'm only getting {5} showing up as the message. I've done all the edits as directed. Any ideas? I see this was a 1.4 code edit... did something change?
Pages: 1 2