diff --git a/common/framework/drivers/mail/base.php b/common/framework/drivers/mail/base.php index 69b0f0215..4cb0fc093 100644 --- a/common/framework/drivers/mail/base.php +++ b/common/framework/drivers/mail/base.php @@ -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. * diff --git a/common/framework/drivers/mail/mailfunction.php b/common/framework/drivers/mail/mailfunction.php index 5bdeae202..cdf835fd1 100644 --- a/common/framework/drivers/mail/mailfunction.php +++ b/common/framework/drivers/mail/mailfunction.php @@ -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. * diff --git a/common/framework/drivers/mail/mailgun.php b/common/framework/drivers/mail/mailgun.php index 0cc0f6bb7..fa508dd8a 100644 --- a/common/framework/drivers/mail/mailgun.php +++ b/common/framework/drivers/mail/mailgun.php @@ -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. * diff --git a/common/framework/drivers/mail/mandrill.php b/common/framework/drivers/mail/mandrill.php index e360a3ecd..5dc9afc08 100644 --- a/common/framework/drivers/mail/mandrill.php +++ b/common/framework/drivers/mail/mandrill.php @@ -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'; + } } diff --git a/common/framework/drivers/mail/postmark.php b/common/framework/drivers/mail/postmark.php index 4dc0d5a5c..55e4129cc 100644 --- a/common/framework/drivers/mail/postmark.php +++ b/common/framework/drivers/mail/postmark.php @@ -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'; + } } diff --git a/common/framework/drivers/mail/sendgrid.php b/common/framework/drivers/mail/sendgrid.php index ba1c6f1a8..0b73d55f0 100644 --- a/common/framework/drivers/mail/sendgrid.php +++ b/common/framework/drivers/mail/sendgrid.php @@ -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'; + } } diff --git a/common/framework/drivers/mail/ses.php b/common/framework/drivers/mail/ses.php index 85b3755aa..26c51c6b7 100644 --- a/common/framework/drivers/mail/ses.php +++ b/common/framework/drivers/mail/ses.php @@ -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. * diff --git a/common/framework/drivers/mail/sparkpost.php b/common/framework/drivers/mail/sparkpost.php index 7e4ed992d..a7b02b947 100644 --- a/common/framework/drivers/mail/sparkpost.php +++ b/common/framework/drivers/mail/sparkpost.php @@ -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. * diff --git a/common/framework/drivers/mail/woorimail.php b/common/framework/drivers/mail/woorimail.php index 7aee06ed7..2e9d6d939 100644 --- a/common/framework/drivers/mail/woorimail.php +++ b/common/framework/drivers/mail/woorimail.php @@ -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. * diff --git a/common/framework/drivers/mailinterface.php b/common/framework/drivers/mailinterface.php index 03385ebc4..92aa14e70 100644 --- a/common/framework/drivers/mailinterface.php +++ b/common/framework/drivers/mailinterface.php @@ -36,6 +36,20 @@ interface MailInterface */ public static function getAPITypes(); + /** + * Get the SPF hint. + * + * @return string + */ + public static function getSPFHint(); + + /** + * Get the DKIM hint. + * + * @return string + */ + public static function getDKIMHint(); + /** * Check if the current mail driver is supported on this server. *