Commit 88c359c1 authored by songxiaohang's avatar songxiaohang

add:非test、生产不发邮件

parent f3440899
......@@ -2,6 +2,8 @@
namespace Api\PhpUtils\Message;
use Yaf\Application;
class Email
{
/**
......@@ -19,6 +21,10 @@ class Email
if (empty($to)) {
return false;
}
$env = Application::app()->environ();
if($env != 'test' || $env != 'prod' || $env != 'perf'){
return false;
}
if (empty($from)) {
$from = 'noreply@yidian-inc.com';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment