0

I am using cakephp, and sending email through cakeemail with smtp. My hosting is on 1and1.com. Email is going to deliver on gmail but not on yahoo and hotmail.

Then I try the PHPMailer on same server and its email was going to deliver on gmail and hotmail as well. But unfortunatly I am unable to use PHPMailer with cakephp. I have try two tutorial but fails. One of them is here.

I will prefer to fix the problem with cakeemail, if some one can help regarding this.

Or if can get solution with PHPMailer for cakephp that is also ok.

Here is the my code

                $email = new CakeEmail();  
                $email->smtp = array(
                     'port'=>'25',
                     'timeout'=>'30',
                     'host' => 'smtp.1and1.com',
                     'username'=>'quote@xxxxxx.com',
                     'password'=>'xxxxxx_',
                     'client' => 'smtp.1and1.com' ,
                     'transport' => 'Smtp'
                );

                $email->from(array('xxxx@a-xxxx.com' => 'A-Best Auto Parts Quote')); 
                $email->to("xxxx@yyy.com");
                //$email->bcc("xxxx@yyy.com");
                $email->subject('My Test Subject');
                $email->emailFormat('html');                
                $body="the test message for email"
                $email->send($body);
Synchro
  • 35,538
  • 15
  • 81
  • 104
nbhatti2001
  • 353
  • 2
  • 7
  • 33
  • If it's going through one email service but not others, I'd guess the email's getting flagged by spam filters. – Kai Dec 11 '14 at 20:26
  • I don't think I'd expect that to work too well - it's really old code using an even older version of PHPMailer. – Synchro Dec 11 '14 at 23:28

0 Answers0