fuel / email

Fuel PHP Framework - Fuel v1.x Email library
60 stars 38 forks source link

Smtp: Sending HELP gets unexpected response #4

Closed ushis closed 13 years ago

ushis commented 13 years ago

Hey,

this line: https://github.com/fuel/email/blob/1.1/develop/classes/email/driver/smtp.php#L118

<?php
$this->smtp_send('HELP', 214);

let throw a SmtpCommandFailureException in Email_Driver_Smtp::smtp_send(). It works great without it, but I actually don't know what sending help is for. I got the following message:

[HELP] expecting: 214
received: 502 5.5.2 Error: command not recognized

It seams that HELP is not supported by my mail server. Is it rellay important enough to stop sending the mail?

frankdejonge commented 13 years ago

Hey, I think this fixes it. Could you try it? Replace the HELP line with this:

try
{
    $this->smtp_send('HELP', 214);
}
catch(\SmtpCommandFailureException $e)
{
    // Let this pass as some servers don't support this.
}
ushis commented 13 years ago

@FrenkyNet Yeah, that works.

Another small issue. This line is useless: https://github.com/fuel/email/blob/1.1/develop/classes/email/driver/smtp.php#L109

Shall i do the changes or will you do that?

frankdejonge commented 13 years ago

Fixed

ushis commented 13 years ago

Thx. Now none of the params of Email_Driver_Smtp::smtp_connect($authenticate, $force_ehlo) is used anymore...

frankdejonge commented 13 years ago

Lol, thanks for the heads up. Will remove.