Thursday, July 30, 2009

EmailComponent & DomainKeys - SPF Records - Not Working -Solution-

Hey all I just wanted to share how i got DomainKeys and SPF records to
work with CakePHP's EmailComponent.

The first prerequisite was to obviously enable SPF record and
DomainKeys from cpanel.
(actually i used /usr/local/cpanel/bin/install_domain_keys_installer
myusername (from bash shell))

that was actually a no brainer. the problem was my email headers from
EmailComponent were not authenticating properly, missing DomainKeys
entirely and SPF record returned neutral.

i sent a few test messages from Horde and the DomainKeys and SPF
records were there (after a restart of the exim mail service on my
server).

So why wasn't EmailComponent playing nice?

you need to set the delivery variable in $Email object to:

$this->Email->delivery = 'smtp';

lo and behold everything worked after that. after looking at
EmailComponent more deeply i realized that by default it uses PHP's
mail() function which does not support Domain Keys (or so i believe).

I truly hope this saves someone of few hours.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: