check configuration values before sending mail
This commit is contained in:
parent
9de795e1b1
commit
7e4e5fcb4f
1 changed files with 9 additions and 0 deletions
|
|
@ -91,6 +91,15 @@
|
||||||
*/
|
*/
|
||||||
public static function sendMail($to, $messageAction, $html=false, $params=null, $linker=null)
|
public static function sendMail($to, $messageAction, $html=false, $params=null, $linker=null)
|
||||||
{
|
{
|
||||||
|
// Check configuration
|
||||||
|
if(
|
||||||
|
empty(\nre\configs\AppConfig::$mail['host']) ||
|
||||||
|
empty(\nre\configs\AppConfig::$mail['port']) ||
|
||||||
|
empty(\nre\configs\AppConfig::$mail['username'])
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Load classes
|
// Load classes
|
||||||
\hhu\z\lib\PHPMailerAutoload::load();
|
\hhu\z\lib\PHPMailerAutoload::load();
|
||||||
\hhu\z\lib\PHPMailer::load();
|
\hhu\z\lib\PHPMailer::load();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue