First implementation

This commit is contained in:
Romain Neutron
2012-10-23 14:55:41 +02:00
parent 4661a02e1f
commit b5980ab866
18 changed files with 326 additions and 30 deletions

View File

@@ -188,14 +188,9 @@ class mail
return self::send_mail($app, $subject, $body, $to);
}
public static function validateEmail($email)
{
return PHPMailer::ValidateAddress($email);
}
public static function send_mail(Application $app, $subject, $body, $to, $from = false, $files = array(), $reading_confirm_to = false)
{
if ( ! isset($to['email']) || ! PHPMailer::ValidateAddress($to['email'])) {
if ( ! isset($to['email']) || !\Swift_Validate::email($to['email'])) {
return false;
}