Tuesday, September 29, 2009

Re: Email Component Skip Authentification when using SMTP

Hi mate :)

resolve is simple:

look carefully at host and string => ssl://

$config['Email']['from'] = 'info@sycyliada.pl';
$config['Email']['fromName'] = 'Zespół Mio Technology';
$config['Email']['fromHeader'] = "{$config['Email']['fromName']} <
{$config['Email']['from']}>";
$config['Email']['host'] = 'ssl://gemininova.home.pl';
$config['Email']['port'] = '465';
$config['Email']['username'] = 'username';
$config['Email']['password'] = 'passs';

On 28 Sie, 16:20, Ephigenia <l...@ephigenia.de> wrote:
> Hi Guys,
>
> i just discovered a small bug in the latest cake php email component
> class when using SMTP delivery and server does not need any
> authentification to be send.
>
> The email component checks the authentification method by sending
> "AUTH LOGIN"
> to the server and checks the response code for a valid
> authentification status code. But it also should check for a 504 code
> wich says that the SMTP Server does not need any authentification at
> all:
>
> $authRequired = $this->__smtpSend('AUTH LOGIN', '334|503);
> should become this:
> $authRequired = $this->__smtpSend('AUTH LOGIN', '334|503|504');
>
> And the additional status code must be added to the if after it as
> well:
> $authRequired == '504', so that the hole part looks like this:
>
> if (isset($this->smtpOptions['username']) && isset($this->smtpOptions
> ['password'])) {
>                         $authRequired = $this->__smtpSend('AUTH LOGIN', '334|503|504'); //
> changed line
>                         if ($authRequired == '334') {
>                                 if (!$this->__smtpSend(base64_encode($this->smtpOptions
> ['username']), '334')) {
>                                         return false;
>                                 }
>                                 if (!$this->__smtpSend(base64_encode($this->smtpOptions
> ['password']), '235')) {
>                                         return false;
>                                 }
>                         } elseif ($authRequired == '504') { // changed line
>                         } elseif ($authRequired != '503') {
>                                 return false;
>                         }
>                 }
>
> Could that be implemented in the next release? Thanks!
--~--~---------~--~----~------------~-------~--~----~
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: