Jump to content

Stop all email notifications during testing?


NeedCoffee

Recommended Posts

We're performing a test migration from vBulletin to IPB. We will then spend a few weeks doing some testing with a small group of volunteers. During this period, we want to ensure that no email notifications are sent out. For example, if we reply to an old thread, in our private testing area, we don't want it firing off 'new reply' emails. Any ideas? 

Link to comment
Share on other sites

Quote

Email Debugging

You can write full email logs to disk. If you need to debug the emails being sent from the Community, you can create a folder (example here named _mail) with appropriate write permissions in your Community root directory, and then add in your constants.php (editing the example path provided):


define( 'EMAIL_DEBUG_PATH', "/full/path/to/the/folder/_mail" );

This will cause every email that is sent to be logged to a flat file under this _mail folder. The email will not actually be sent. You should not leave this on for long, especially on a production forum as it can generate a lot of logs.

  • The emails will not be delivered to the recipients
  • The files written are in plain text, and viewable via a web browser if you know the correct URL
  • A high-traffic forum can generate many hundreds or thousands of debug files in a day

The debug switch is useful to determine the raw contents of the email being sent to identify any problems, and to confirm the emails you expect to send are being generated and passed to the mail transport agent.

 

Link to comment
Share on other sites

1 hour ago, Daniel F said:

You could also use the email debug path and store the emails in dev/null or your php temp directory ?

I used


define( 'EMAIL_DEBUG_PATH',   sys_get_temp_dir() );

until I switched to https://mailcatcher.me/

Thanks, having read the guide I created a 'constants.php' in our install's root and the contents now read as follows:

<?php

define ('EMAIL_DEBUG_PATH', "/dev/null");

Is that it? Do I need to close the PHP tag? Is there anyway of confirming if mail is *not* being set? lol

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...