i developing 1 web application in cakephp 2.2.3. application using cakeemail. want implement sparkpost plugin email deliver.
i spend lots of time in google not getting satisfied result. code found cakephp 3.0 or higher.
below have posted links cakephp 3.x -
https://github.com/syntaxera/cakephp-sparkpost-plugin
https://github.com/narendravaghela/cakephp-sparkpost
please me , give me idea implement sparkpost in cakephp 2.x.
sparkpost supports smtp configure cakephp that. here's (guessed-at) configuration stanza:
class emailconfig { public $sparkpost = array( 'host' => 'smtp.sparkpostmail.com', 'port' => 587, 'username' => 'smtp_injection', 'password' => 'your_api_key_with_smtp_privileges', 'transport' => 'smtp', 'tls' => true ); }
then in controller code, instantiate cakeemail
instance using config stanza named above:
$email = new cakeemail(); $email->config('sparkpost'); $email->from(...)->to(...)->subject(...)->send();
Comments
Post a Comment