FAQ

Setup Send/Receive Emails based on location







# 1 > Setup - Bootstrap

-> Create a test email for testing purpose "testemail@domainname.com"

on app->Config->bootstrap.php, add the following

if (in_array($_SERVER['HTTP_HOST'], 'www.domainname.com'))) {
Configure::write('email.to', array('realemail@domainname.com'));
} else {
Configure::write('email.to', array('testemail@domainname.com'));
}




# 2 > Configure Email in other places

-> Where ever we want to use the email, just call the email by using the following code

-> Configure::read('email.to');