Jump to content

Block all outgoing e-mails


jesuralem

Recommended Posts

Hi,

I installed a test environment in order to try my migration and customisation, i am afraid e-mails might be sent to users from this environment. So i would like ot block all outgoing e-mails for this instance.

Is there any "normal" way to do so ? i have set up a dummy smtp server for now but it is not optimal...

Link to comment
Share on other sites

You can block all outgoing mail by defining a path for the system variable, EMAIL_DEBUG_PATH (by default it's set to NULL in init.php). As an example, in your constants.php file:

define( 'EMAIL_DEBUG_PATH', '/path/where/you/want/mail/placed');

replace /path/where/you/want/mail/placed with whatever physical path you want the mail to be stored.

Note that this will block all mail from actually being sent. The mail body, in .eml format, will be written to the folder you specify.

(Also note that there is no indication in the admin panel or front end that this is happening, so if you use that install to go "live" at some point, be certain to remove that line in constants.php.)

Link to comment
Share on other sites

I do this, mainly localhost to ensure I have them 'to hand' however if you're doing it live I would strongly recommend you drop an empty index.htm into the 'mail' directory. You could put a .htaccess in as well I guess, but generally I found both a blank index.htm and a blank index.php was enough to keep out the curious if they found it. Previous versions used to offer similar although it was called fake_mail in that case, similar for that.

Although Mark has covered it all excellently above ( as he always does ;) ) this is what I have for my localhost installation, bearing in mind my Wamp is in D: drive and the suite directory is ips43...

define( 'EMAIL_DEBUG_PATH', "d:/wamp/www/ips43/_mail");

So with that all I have is a _mail directory sat in the ips43 directory...

 

 

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...