Hi All,
This is a very small hack, but one that my users requested:
When you send a fellow member an e-mail via the BB mailform, you can select to also receive a copy of this e-mail to your address.
The "installation" (for lack of better word) includes inserting a small piece of code into member.php, adding a small piece of HTML into one template, and creating a simple text-only new template.
Enjoy!
Installation Instructions:
1. Open member.php. Almost completely at the end of the script, find:
BELOW it add:PHP Code:mail($destuserinfo[email],$subject,$sendmessage,"From: \"$bbuserinfo[username]\" <$bbuserinfo[email]>");
Save file and upload.PHP Code:if ($getcopy) {
$subject = "FW: ".$subject;
eval("\$sendmessage = \"".gettemplate("email_copymessage",1,0)."\";");
mail($bbuserinfo[email],$subject,$sendmessage,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
2. Edit template mailform.
Find, almost at the bottom:
And ABOVE it add:Code:<input type="hidden" name="action" value="emailmessage"> <input type="hidden" name="userid" value="$userid"> <input type="submit" class="bginput" name="submit" value="Send email"> <input type="reset" class="bginput" name="reset" value="Clear Fields">
3. Create new template, called email_copymessage with the following content:Code:<input type="checkbox" name="getcopy" value="1"> <smallfont><b>Check this box if you want to receive a copy of this message to your e-mail</b></smallfont> <br><br>
(change the text to whatever you like really)This is a copy of an e-mail message you sent to $destuserinfo[username] at $bbtitle ( $bburl/index.php ):
--------------------------------------------------------------------------
$message
THAT'S IT!
The mailform will now look like this:
If you check this box, a copy of the e-mail you just sent will also be sent to you.
Cheers,
Bira









Bookmarks