fuel / email

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

smtp timeout work for only connection, not for each stream read/write. #11

Closed HiroKws closed 12 years ago

HiroKws commented 12 years ago

http://fuelphp.com/forums/topics/view/6742

I'm not sure about PHP and it's stream handling, but in smtp.php only timeout only apply for making connection, not for each stream read/write.

In result, when no reply on sending an email, it reached PHP timeout(default 30 sec.) so EmailSendingFailedException can't handle this situation.

This timeout must be caught by this exception.

ML Hirohisa Kawase

HiroKws commented 12 years ago

No one don't know about this??

Ahahahaha, maybe it came from my bad English. I don't care. Someone found same situation someday...

I put this one line just before fput/fget statments in smtp.php, and now it work well.

I didn't find how it work, why/where throw exception. But it work well. :)

HiroKws commented 12 years ago

Oh, I forgot my inserted line.

I put this line just before fput/fget,

stream_set_timeout($this->smtp_connection, 5);

WanWizard commented 12 years ago

@FrenkyNet I've put this one on the list for 1.2.

frankdejonge commented 12 years ago

Yeah, I've done the research this week, a little more is needed then just the stream_set_timeout. So it's in progress.