==README for the Direct Email add-on==
Release date: December 6, 2004.
Latest update: February 5, 2026.
miniBB version: 3.3 and up
Author: Paul Puzyrev (minibb.com).

"Direct Email" is an addon to miniBB which allows visitors to send emails to users using server's internal mailing, without disclosuring a registered email address.

==INSTALLATION==

***** Copy addon_directemail.php your forums folder.

***** Copy email_direct_mode.txt, addon_directemail.html to the forums/templates/ folder (edit template files, if necessary).

***** Copy the proper language pack to the forums/lang/ folder (directemail_eng.php is the basic language)

***** In forums/bb_plugins.php file, paste the code provided in bb_plugins.code.txt. Please note! this code consists of two parts: 

/* Direct email addon */ code should be pasted anywhere, probably closer to the beginning of the file, after Captcha or Who's online add-on.

/* Direct email add-on - Report link */ should be pasted before 'return' statement of the parseMessage() function. Since this function is often used for other add-ons (like File Upload or Moving Replies), please be aware to not create function's definition twice, else it will bring a PHP's fatal error.

Set $directEmailGuests=FALSE; in bb_plugins.code if you would like to disable this feature for Guests (non-logged users).

***** If you would like to enable "Report Post" feature, which allows to forward an 'improper' message on forums to the admin (or any other user, which ID could be specified in /* Direct email add-on - Report link */ code - URL part saying user=...), edit templates/main_posts_cell.html template and paste {$reportLink} variable at the place you want. The code and look of this link could be edited in the code of parseMessage() function as well.


==USAGE==

When somebody checks the info of forums member (clicking on 'Member' title in the thread for example), he will see either member's email (if member has allowed to "Show email public"), or the link "You can send email through server". Clicking it, you will enter an emailing form (your email address which is registered on forums, will be added to 'Reply-To' field automatically if you are logged in), and then submit it. Recipient's email won't be shown during this process.

If you have enabled "Report Link" feature, in each forum message there should be available a link called 'Report'. Clicking on it will force the regular direct emailing process, but the message text will be automatically substituted with the warning text (from language pack), message text and URL to the message. User is free to modify this text as well.


==NOTES==

Set $genEmailDisable=0; in setup_options.php to let this add-on work.

This plugin will work only if you can send emails on your server via sendmail/PHP ligament (or if you are using SMTP class used in sendMail() function of miniBB).

Protection of this addon is included in the Human Authorization addon actions list ("Captcha": http://www.minibb.com/captcha.html ). If you have Captcha installed, each time any user (both Guest if allowed, or registered member) tries to send the message, he will be forced to enter Human Authorization code first. This code is reset after the message has been sent successfully. That way your forum users can not be spammed by a robot.

==FINALLY==
We hope you'll enjoy! Please, post bugs and suggestions on our forums:
http://www.minibb.com/forums/11_4215_0.html
