Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in Email library #2289

Closed
dmmihaylov opened this Issue Feb 27, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@dmmihaylov
Copy link
Contributor

dmmihaylov commented Feb 27, 2013

Hi there,

I'm using the email library to connect to SendGrid SMTP API. After recent pull from this repo it stopped working. Error was:

250-8BITMIME
250-SIZE 20480000
250-AUTH=PLAIN LOGIN
250-AUTH PLAIN LOGIN
250 STARTTLS
from: 501 Syntax error in parameters or arguments
The following SMTP error was encountered: 501 Syntax error in parameters or arguments
to: 503 Must have sender before recipient
The following SMTP error was encountered: 503 Must have sender before recipient
data: 503 Must have valid receiver and originator
The following SMTP error was encountered: 503 Must have valid receiver and originator
500 Command not implemented
The following SMTP error was encountered: 500 Command not implemented
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

Checked all changes made in this class and removed following lines:

if (strpos($reply, '503') !== 0) // Already authenticated
{
  return TRUE;
}

Class and API calls worked fine after that. I assume other SMTP servers might not work as well that way?

@narfbg

This comment has been minimized.

Copy link
Contributor

narfbg commented Mar 4, 2013

Could you try and see if the following fixes it?

if ($this->keep_alive === TRUE && strpos($reply, '503') !== 0)

@nisheeth-barthwal (#2256), could you comment or suggest a fix for this?

@dmmihaylov

This comment has been minimized.

Copy link
Contributor Author

dmmihaylov commented Mar 4, 2013

Just tried, this change fixed the issue.

nbaztec added a commit to nbaztec/CodeIgniter that referenced this issue Mar 4, 2013

@nbaztec

This comment has been minimized.

Copy link
Contributor

nbaztec commented Mar 4, 2013

Oops, this is embarrassing, should've been strpos($reply, '503') === 0, since if we get a 503 we are already authenticated.

@narfbg

This comment has been minimized.

Copy link
Contributor

narfbg commented Mar 4, 2013

@tocaibiza Could you confirm if changing !== to === works?

@dmmihaylov

This comment has been minimized.

Copy link
Contributor Author

dmmihaylov commented Mar 4, 2013

Confirmed, works after this change.

@narfbg narfbg closed this in fa01ae4 Mar 4, 2013

nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013

nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.