mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Better emulate Advanced Mailer features
This commit is contained in:
parent
19ef36728f
commit
bdd00fe6b7
2 changed files with 23 additions and 3 deletions
|
|
@ -197,7 +197,7 @@ class Mail extends Rhymix\Framework\Mail
|
|||
* @param string $email_address Email address to check
|
||||
* @return bool
|
||||
*/
|
||||
public function checkMailMX($email_address)
|
||||
public static function checkMailMX($email_address)
|
||||
{
|
||||
if(!self::isVaildMailAddress($email_address))
|
||||
{
|
||||
|
|
@ -218,13 +218,23 @@ class Mail extends Rhymix\Framework\Mail
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this class supports Advanced Mailer features.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isAdvancedMailer()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if param is a valid email or not
|
||||
*
|
||||
* @param string $email_address Email address to check
|
||||
* @return string
|
||||
*/
|
||||
public function isVaildMailAddress($email_address)
|
||||
public static function isVaildMailAddress($email_address)
|
||||
{
|
||||
if(preg_match("/([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)/i", $email_address))
|
||||
{
|
||||
|
|
@ -242,7 +252,7 @@ class Mail extends Rhymix\Framework\Mail
|
|||
* @param string $filename filename
|
||||
* @return string MIME type of ext
|
||||
*/
|
||||
function returnMIMEType($filename)
|
||||
public static function returnMIMEType($filename)
|
||||
{
|
||||
return Rhymix\Framework\MIME::getTypeByFilename($filename);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -578,6 +578,16 @@ class Mail
|
|||
return $this->sent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get errors.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getErrors()
|
||||
{
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert image paths to absolute URLs.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue