Startseite arrow newpost2mail (phpBB3) arrow newpost2mail for phpBB3 (english)
newpost2mail for phpBB3 (english) PDF Drucken E-Mail
phpBB3 - newpost2mail
» zur deutschen Version deutsch

newpost2mail is a phpBB3 MOD for sending all new posts as HTML formatted mail to admins, groups or any other recipients (i.e. moderators).

This mod will send you an email everytime a new post is made. This HTML email contains the content of the post which is formatted similar to the prosilver theme which is provided with phpBB3 default installation. Additional information such as the IP and the hostname the post was made from is provided inside. Also you will find links to popular actions regarding the post (edit, delete, quote, reply ...).

Mails will be sent for all forums or just for individual forums. Also you can configure individual recipients for each forum. This is useful if you don't want to monitor all forums or if you want to let moderators monitor their forums.

Further information about the development of newpost2mail can be found here. If you have any problems or suggestions this should be discussed there - thanks.


Installation / updating from an older version:

Installation and configuration is quite easy, just follow these steps:

Download the latest version of newpost2mail for phpBB3, you'll find it at the bottom of this page.

Unpack it and copy newpost2mail.php, newpost2mail.css and newpost2mail.config.php to the root directory of your phpBB3 installation.

If you are updating from an older version, just overwrite the files. If there was no change in the config file, you can leave your old newpost2mail.config.php to keep your settings. Same for newpost2mail.css, so always check the version history to see if newpost2mail.config.php or newpost2mail.config.css have been changed.

Edit posting.php in your phpBB3 root directory. Find the following line (line 1134 in phpBB v3.0.10):

$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);

After this line, add/insert the following line:

include($phpbb_root_path . 'newpost2mail.php');


If you are using phpBB v3.1.x, find the following line instead:

$redirect_url = submit_post($mode, $post_data['post_subject'], $post_author_name, $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);

That's all, the mod will work now and send formatted HTML mails to you whenever a new post is made.

You can configure some settings by editing newpost2mail.config.php. All settings are documented there.
Also parts of the layout can be changed in newpost2mail.css.

Version history:

beta  21

  • Added compatibility for phpBB3 v3.1.x
  • Better support for displaying images and smileys
  • New languages: italian (it) and croatian-hrvatski (hr)

beta  20

  • Display fixes, better display in Mozilla Thunderbird and better support for languages with foreign character sets (kyrillic etc.)

beta  19

  • Bugfix: In some cases the subject line of the mail header was broken (happens only since phpBB v3.0.5)

beta 18

  • Suppression of error messages added if the poster's IP cannot be determinated
  • Fixed incompatibility with PostgrSQL
  • Fixed incompatibility of security fix which was added in beta 17
  • Fixed incompatibility of constants declaration in some environments

beta 17

  • Security fix: allow calling of newpost2mail.php from posting.php only.

beta 16

  • Added group support. Now n2m can send mails to whole groups defined in your phpBB3 installation. See newpost2mail.config.php for details on how to configure this.
  • Added spanish translation (es).

beta 15

  • Fixed an issue showing "edited by" in some cases even if the editor is the same as the poster. So now in this case "edited by" is not shown anymore.
  • Fixed an issue not parsing the configuration file in some PHP setups.

beta 14

  • Added support for sending mails only on selected actions (post, reply, quote and edit). This can be configured in newpost2mail.config.php.
  • Added international character support for the sender name (From field).
  • Added portuguese translation (pt).
  • Fixed an issue regarding some mail clients (like MS Outlook Express) which have problems if the lines of the mail body are too long (parts of the body aren't displayed in this case). To prevent this, lines are now split after each <br />.

beta 13

  • Fixed bug showing signatures only for edited posts. Only newpost2mail.php has been updated for that.

beta 12

  • Fixed bug not showing images if your board URL wasn't the domains root (i.e. instead of Only newpost2mail.php has been updated for that.

beta 11

  • Fixed bug showing wrong user data. Only newpost2mail.php has been updated for that.

beta 10

  • Order of informational table has been changed for better readability.
  • Enhanced support and bugfixes for 3rd party edits.
  • newpost2mail.css has been changed!
  • newpost2mail.config.php has been changed, added new phrases for 3rd party edits: $n2m_TEXT[en][edited_by] and $n2m_TEXT[en][edit_reason].
  • New variable $post_EDITOR available in newpost2mail.config.php for use in subject line if needed.

beta 9

  • Multi language support and german translations added. Additional languages can simply be defined now by the admin in newpost2mail.config.php to match your needs. The board default language defined in phpBB3 is used by default, but this can be overwritten in the configuration. See config file for details about adding and selecting your own language. If your board default language is other than german or english and no translation for your language can be found in the config file, english will be used. In this case newpost2mail will run out of the box as it did before beta 9 and you can add your own translation later if needed.
  • newpost2mail.css has been updated for some smaller format and layout enhancements.

beta 8

  • Added feature to monitor individual forums by different recipients. This is useful if you don't want to monitor all forums or if you want to let moderators monitor their forums. See newpost2mail.config.php for details about how to do that. 
  • Added new configuration switch $n2m_MAILTO_BOARDCONTACT. If this is set to 1 an email to the board contact address is sent on every new post. This is the default setting.
  • Optimized encoding of subject line for supporting international characters. We now use the phpBB function mail_encode() for that.

beta 7

  • Attachment handling has been optimized, now it works the same way phpBB3 does, including display of attachments within the posted text (inline attachments).
  • newpost2mail.css has been updated for attachment handling.
  • Before beta 7, the php built in mail() function has been used for sending out the emails. Now we use whatever you have configured for your phpBB3 installation, so SMTP servers can be used if needed.

beta 6

  • Before beta 6, theme prosilver was used for formatting the email if configured. This gave a large overhead, because the mail client had to load all the style information from your webserver (~60kb), but only a very small part of this stylesheet was needed to display the posted message.
    Now only the required style data is included in the mail body. We read this from the new file newpost2mail.css and insert this to the html header in the mail body. The result is a layout close to the one the original prosilver theme provides, but the stripped down code now is only ~2kb, this means much less traffic and higher speed to display the mail. You can change this layout by editing the file if you want. The prosilver theme is not used or needed anymore by newpost2mail.
  • In newpost2mail.config.php the setting $n2m_USE_PROSILVER has been dropped, it's not used anymore.
  • If the hostname for the posting IP could not be retrieved, the IP was shown instead, so it was shown twice. Now n/a is displayed for the hostname if it's not available.

beta 5

  • The forum name is now displayed with its forum parent(s).
    A new variable $post_FORUMPARENTS is available for the config file to reflect this, so you can put the parent(s) into your subject line if needed.
    Both is useful if you have organized your board with subforms and you have several forums with equal names.
  • Fixed a small display bug in signature handling if posting has no signature.

beta 4

  • Added the following links to certain actions:
    - reply to post
    - quote post
    - edit post
    - delete post
    - info about post
    - pm user
    - email user (you must have a valid login session or the link doesn't work)
  • Added support for showing the signature in the email. Can be switched on or off using the config file.
  • Added support for showing the users email address including a mailto: link. Can be configured to always show the email address or only if the user has allowed to contact him by email.
  • Config file has been changed, new options $n2m_ALWAYS_SHOW_EMAIL and $n2m_SHOW_SIG.
  • Config file has been renamed to newpost2mail.config.php for security reasons. Delete your old newpost2mail.config if you are upgrading to beta 4.

beta 3

  • Attachment support added:
    If images are attached (.jpg, .jpeg, .gif or .png), these are displayed in the email.
    For all other file types, there will be a hyperlink to the attachment.
  • No changes were made to newpost2mail.config since beta 2. So you can keep your old file from beta 2 if you have made any changes.

beta 2

  • Added configuration file. No need to make changes to newpost2mail.php anymore.
  • Multiple recipients can be configured now.
  • Subject Line of mail can be configured to match your needs.
  • You can configure to use the prosilver theme for fancy formatting your mail or to use just simple HTML.
  • The width of the mail text can be configured.

beta 1 and before

This is documented in the thread mentioned above.


Download latest version:

Letzte Aktualisierung ( Dienstag, 20. Januar 2015 )