Introducing Quests: Tailored gamification & bridging in-person events with your community Mike Gitkos Friday at 12:39 PM1 day
Posted May 29, 20187 yr 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?
May 29, 20187 yr 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.
May 29, 20187 yr Author Thanks @newbie LAC - that's probably going to be our best bet. There's no option just to not send them and not log them is there? We don't really need the logging at this stage.
May 29, 20187 yr I wasn't aware of the email debug switch, but an alternative is a fake SMTP server like this one: https://mailtrap.io. Should save you from dealing with logs, and you can still see the emails if you want. Edited May 29, 20187 yr by evandixon
May 29, 20187 yr 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/
May 29, 20187 yr Author 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
May 30, 20187 yr You do not need to close the PHP tag. If you are outputting to /dev/null then no, you can't really confirm. ? You could use a real path at first to test, then switch it back to /dev/null.
Archived
This topic is now archived and is closed to further replies.