mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
Add SPF and DKIM hints for each sending method
This commit is contained in:
parent
ce66292fe4
commit
729bfe8239
10 changed files with 184 additions and 0 deletions
|
|
@ -66,6 +66,26 @@ abstract class Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -25,6 +25,16 @@ class MailFunction extends Base implements \Rhymix\Framework\Drivers\MailInterfa
|
|||
return 'PHP mail()';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'ip4:$SERVER_ADDR';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,6 +22,26 @@ class Mailgun extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
return array('api_domain', 'api_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'include:mailgun.org';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return 'mailo._domainkey';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -29,4 +29,24 @@ class Mandrill extends SMTP implements \Rhymix\Framework\Drivers\MailInterface
|
|||
{
|
||||
return array('api_user', 'api_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'include:spf.mandrillapp.com';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return 'mandrill._domainkey';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,4 +29,24 @@ class Postmark extends SMTP implements \Rhymix\Framework\Drivers\MailInterface
|
|||
{
|
||||
return array('api_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'include:spf.mtasv.net';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return '********.pm._domainkey';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,4 +29,24 @@ class SendGrid extends SMTP implements \Rhymix\Framework\Drivers\MailInterface
|
|||
{
|
||||
return array('api_user', 'api_pass');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'include:sendgrid.net';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return 'smtpapi._domainkey';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,26 @@ class SES extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
return array('us-east-1', 'us-west-2', 'eu-west-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return '********._domainkey';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,6 +22,26 @@ class SparkPost extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
return array('api_token');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'include:sparkpostmail.com';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return '********._domainkey';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -51,6 +51,26 @@ class Woorimail extends Base implements \Rhymix\Framework\Drivers\MailInterface
|
|||
return array('free', 'paid');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SPF hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSPFHint()
|
||||
{
|
||||
return 'include:woorimail.com';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the DKIM hint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDKIMHint()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current mail driver is supported on this server.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue