PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail » Bug #3776

smtp connect timeout would be swell

Details

Request #3776smtp connect timeout would be swell
Submitted2005-03-11 16:03 UTC
Fromjcnorris at me3 dot com
Assignedjon
StatusClosed
PackageMail
PHP Version5.0.3
OSWindoze
Roadmaps(Not assigned)

Comments

[2005-03-11 16:03 UTC] jcnorris at me3 dot com

Description:
------------
Using Mail 1.1.4

Line #158 of Mail/smtp.php reads

if (PEAR::isError($smtp->connect())) {

If smtp server is unavailable, my code hangs here until script timeout.

For my use, I have hard-coded a timeout of 10 seconds thusly:

if (PEAR::isError($smtp->connect(10))) {

I propose an additional smtp param called 'timeout' which defaults to NULL