FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

ID: 16962
Updated by: jon@php.net
Reported By: alec at alec dot pl
Summary: dataFromFile() for very big messages support
-Status: Open
+Status: Analyzed
Type: Feature/Change Request
Package: Net_SMTP
Package Version: CVS
PHP Version: Irrelevant
-Assigned To:
+Assigned To: jon
Roadmap Versions:
New Comment:

-Status: Open
+Status: Analyzed
-Assigned To:
+Assigned To: jon
I'd be happy to consider a patch that implements the requested
behavior.

I think the Net_Socket package would also require an update. It
currently expects its outbound data as a string (rather than a stream),
so that interface would need to be extended/improved before the Net_SMTP
package could make use of it.


Previous Comments:
------------------------------------------------------------------------

[2009-12-31 12:53:02] alec

Description:
------------
Currently it's not possible to send a very big message, let's say
500MB, because PHP's memory_limit. It would be nice to have a function
to read message data from file and send it line by line.

------------------------------------------------------------------------

Search Discussions

  • Alec at Jan 4, 2010 at 8:06 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: alec@alec.pl
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    Status: Analyzed
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    I think we can do this without Net_Socket change, simply sending data
    line by line using _send(). Do we?

    $handle = fopen("file", "r");
    // here sent DATA
    ...
    // now file content
    while (!feof($handle)) {
    $data = fgets($handle, 1024);
    if ($data ===false)
    return "read error";
    $this->quotedata($data);
    if (PEAR::isError($result = $this->_send($data))) {
    return $result;
    }
    }
    fclose($handle);
    // and here "\r\n.\r\n"
    ...


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-03 07:31:04] jon

    -Status: Open
    +Status: Analyzed
    -Assigned To:
    +Assigned To: jon
    I'd be happy to consider a patch that implements the requested
    behavior.

    I think the Net_Socket package would also require an update. It
    currently expects its outbound data as a string (rather than a stream),
    so that interface would need to be extended/improved before the Net_SMTP
    package could make use of it.

    ------------------------------------------------------------------------

    [2009-12-31 12:53:02] alec

    Description:
    ------------
    Currently it's not possible to send a very big message, let's say
    500MB, because PHP's memory_limit. It would be nice to have a function
    to read message data from file and send it line by line.

    ------------------------------------------------------------------------
  • Jon at Jan 8, 2010 at 6:35 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: jon@php.net
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    Status: Analyzed
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    Yes, I think something like that will work.

    I think the best API would be to expand the current data() method to
    accept the $data parameter as either a string or a file resource. In
    the second case, the caller would be responsible for opening and closing
    the file handle.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-04 08:06:13] alec

    I think we can do this without Net_Socket change, simply sending data
    line by line using _send(). Do we?

    $handle = fopen("file", "r");
    // here sent DATA
    ...
    // now file content
    while (!feof($handle)) {
    $data = fgets($handle, 1024);
    if ($data ===false)
    return "read error";
    $this->quotedata($data);
    if (PEAR::isError($result = $this->_send($data))) {
    return $result;
    }
    }
    fclose($handle);
    // and here "\r\n.\r\n"
    ...

    ------------------------------------------------------------------------

    [2010-01-03 07:31:04] jon

    -Status: Open
    +Status: Analyzed
    -Assigned To:
    +Assigned To: jon
    I'd be happy to consider a patch that implements the requested
    behavior.

    I think the Net_Socket package would also require an update. It
    currently expects its outbound data as a string (rather than a stream),
    so that interface would need to be extended/improved before the Net_SMTP
    package could make use of it.

    ------------------------------------------------------------------------

    [2009-12-31 12:53:02] alec

    Description:
    ------------
    Currently it's not possible to send a very big message, let's say
    500MB, because PHP's memory_limit. It would be nice to have a function
    to read message data from file and send it line by line.

    ------------------------------------------------------------------------
  • Jon at Jan 8, 2010 at 7:13 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: jon@php.net
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    -Status: Analyzed
    +Status: Closed
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    -Status: Analyzed
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on
    pear.php.net by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Have a look at what I just implemented in SVN.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-08 06:34:41] jon

    Yes, I think something like that will work.

    I think the best API would be to expand the current data() method to
    accept the $data parameter as either a string or a file resource. In
    the second case, the caller would be responsible for opening and closing
    the file handle.

    ------------------------------------------------------------------------

    [2010-01-04 08:06:13] alec

    I think we can do this without Net_Socket change, simply sending data
    line by line using _send(). Do we?

    $handle = fopen("file", "r");
    // here sent DATA
    ...
    // now file content
    while (!feof($handle)) {
    $data = fgets($handle, 1024);
    if ($data ===false)
    return "read error";
    $this->quotedata($data);
    if (PEAR::isError($result = $this->_send($data))) {
    return $result;
    }
    }
    fclose($handle);
    // and here "\r\n.\r\n"
    ...

    ------------------------------------------------------------------------

    [2010-01-03 07:31:04] jon

    -Status: Open
    +Status: Analyzed
    -Assigned To:
    +Assigned To: jon
    I'd be happy to consider a patch that implements the requested
    behavior.

    I think the Net_Socket package would also require an update. It
    currently expects its outbound data as a string (rather than a stream),
    so that interface would need to be extended/improved before the Net_SMTP
    package could make use of it.

    ------------------------------------------------------------------------

    [2009-12-31 12:53:02] alec

    Description:
    ------------
    Currently it's not possible to send a very big message, let's say
    500MB, because PHP's memory_limit. It would be nice to have a function
    to read message data from file and send it line by line.

    ------------------------------------------------------------------------
  • Alec at Jan 8, 2010 at 7:14 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: alec@alec.pl
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    -Status: Closed
    +Status: Analyzed
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    -Status: Closed
    +Status: Analyzed
    But you cannot call filesize() on file handle. We need it for SIZE
    check.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-08 07:12:52] jon

    -Status: Analyzed
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on
    pear.php.net by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Have a look at what I just implemented in SVN.

    ------------------------------------------------------------------------

    [2010-01-08 06:34:41] jon

    Yes, I think something like that will work.

    I think the best API would be to expand the current data() method to
    accept the $data parameter as either a string or a file resource. In
    the second case, the caller would be responsible for opening and closing
    the file handle.

    ------------------------------------------------------------------------

    [2010-01-04 08:06:13] alec

    I think we can do this without Net_Socket change, simply sending data
    line by line using _send(). Do we?

    $handle = fopen("file", "r");
    // here sent DATA
    ...
    // now file content
    while (!feof($handle)) {
    $data = fgets($handle, 1024);
    if ($data ===false)
    return "read error";
    $this->quotedata($data);
    if (PEAR::isError($result = $this->_send($data))) {
    return $result;
    }
    }
    fclose($handle);
    // and here "\r\n.\r\n"
    ...

    ------------------------------------------------------------------------

    [2010-01-03 07:31:04] jon

    -Status: Open
    +Status: Analyzed
    -Assigned To:
    +Assigned To: jon
    I'd be happy to consider a patch that implements the requested
    behavior.

    I think the Net_Socket package would also require an update. It
    currently expects its outbound data as a string (rather than a stream),
    so that interface would need to be extended/improved before the Net_SMTP
    package could make use of it.

    ------------------------------------------------------------------------

    [2009-12-31 12:53:02] alec

    Description:
    ------------
    Currently it's not possible to send a very big message, let's say
    500MB, because PHP's memory_limit. It would be nice to have a function
    to read message data from file and send it line by line.

    ------------------------------------------------------------------------
  • Alec at Jan 8, 2010 at 7:17 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: alec@alec.pl
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    Status: Analyzed
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    I've forgot about fstat, looks good to me now. Will test.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-08 07:13:29] alec

    -Status: Closed
    +Status: Analyzed
    But you cannot call filesize() on file handle. We need it for SIZE
    check.

    ------------------------------------------------------------------------

    [2010-01-08 07:12:52] jon

    -Status: Analyzed
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on
    pear.php.net by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Have a look at what I just implemented in SVN.

    ------------------------------------------------------------------------

    [2010-01-08 06:34:41] jon

    Yes, I think something like that will work.

    I think the best API would be to expand the current data() method to
    accept the $data parameter as either a string or a file resource. In
    the second case, the caller would be responsible for opening and closing
    the file handle.

    ------------------------------------------------------------------------

    [2010-01-04 08:06:13] alec

    I think we can do this without Net_Socket change, simply sending data
    line by line using _send(). Do we?

    $handle = fopen("file", "r");
    // here sent DATA
    ...
    // now file content
    while (!feof($handle)) {
    $data = fgets($handle, 1024);
    if ($data ===false)
    return "read error";
    $this->quotedata($data);
    if (PEAR::isError($result = $this->_send($data))) {
    return $result;
    }
    }
    fclose($handle);
    // and here "\r\n.\r\n"
    ...

    ------------------------------------------------------------------------

    [2010-01-03 07:31:04] jon

    -Status: Open
    +Status: Analyzed
    -Assigned To:
    +Assigned To: jon
    I'd be happy to consider a patch that implements the requested
    behavior.

    I think the Net_Socket package would also require an update. It
    currently expects its outbound data as a string (rather than a stream),
    so that interface would need to be extended/improved before the Net_SMTP
    package could make use of it.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=16962
  • Jon at Jan 10, 2010 at 6:58 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: jon@php.net
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    -Status: Analyzed
    +Status: Feedback
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    -Status: Analyzed
    +Status: Feedback
    How are things working for you?


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-08 07:16:53] alec

    I've forgot about fstat, looks good to me now. Will test.

    ------------------------------------------------------------------------

    [2010-01-08 07:13:29] alec

    -Status: Closed
    +Status: Analyzed
    But you cannot call filesize() on file handle. We need it for SIZE
    check.

    ------------------------------------------------------------------------

    [2010-01-08 07:12:52] jon

    -Status: Analyzed
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on
    pear.php.net by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Have a look at what I just implemented in SVN.

    ------------------------------------------------------------------------

    [2010-01-08 06:34:41] jon

    Yes, I think something like that will work.

    I think the best API would be to expand the current data() method to
    accept the $data parameter as either a string or a file resource. In
    the second case, the caller would be responsible for opening and closing
    the file handle.

    ------------------------------------------------------------------------

    [2010-01-04 08:06:13] alec

    I think we can do this without Net_Socket change, simply sending data
    line by line using _send(). Do we?

    $handle = fopen("file", "r");
    // here sent DATA
    ...
    // now file content
    while (!feof($handle)) {
    $data = fgets($handle, 1024);
    if ($data ===false)
    return "read error";
    $this->quotedata($data);
    if (PEAR::isError($result = $this->_send($data))) {
    return $result;
    }
    }
    fclose($handle);
    // and here "\r\n.\r\n"
    ...

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=16962
  • Alec at Jan 15, 2010 at 12:43 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: alec@alec.pl
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    Status: Feedback
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    It's working. I think you can make a new release.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-10 18:56:58] jon

    -Status: Analyzed
    +Status: Feedback
    How are things working for you?

    ------------------------------------------------------------------------

    [2010-01-08 07:16:53] alec

    I've forgot about fstat, looks good to me now. Will test.

    ------------------------------------------------------------------------

    [2010-01-08 07:13:29] alec

    -Status: Closed
    +Status: Analyzed
    But you cannot call filesize() on file handle. We need it for SIZE
    check.

    ------------------------------------------------------------------------

    [2010-01-08 07:12:52] jon

    -Status: Analyzed
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on
    pear.php.net by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Have a look at what I just implemented in SVN.

    ------------------------------------------------------------------------

    [2010-01-08 06:34:41] jon

    Yes, I think something like that will work.

    I think the best API would be to expand the current data() method to
    accept the $data parameter as either a string or a file resource. In
    the second case, the caller would be responsible for opening and closing
    the file handle.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=16962
  • Jon at Jan 17, 2010 at 10:58 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=16962&edit=1

    ID: 16962
    Updated by: jon@php.net
    Reported By: alec at alec dot pl
    Summary: dataFromFile() for very big messages support
    -Status: Feedback
    +Status: Closed
    Type: Feature/Change Request
    Package: Net_SMTP
    Package Version: CVS
    PHP Version: Irrelevant
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    -Status: Feedback
    +Status: Closed
    Thank you for your bug report. This issue has been fixed
    in the latest released version of the package, which you can download
    at
    http://pear.php.net/get/




    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-15 12:42:29] alec

    It's working. I think you can make a new release.

    ------------------------------------------------------------------------

    [2010-01-10 18:56:58] jon

    -Status: Analyzed
    +Status: Feedback
    How are things working for you?

    ------------------------------------------------------------------------

    [2010-01-08 07:16:53] alec

    I've forgot about fstat, looks good to me now. Will test.

    ------------------------------------------------------------------------

    [2010-01-08 07:13:29] alec

    -Status: Closed
    +Status: Analyzed
    But you cannot call filesize() on file handle. We need it for SIZE
    check.

    ------------------------------------------------------------------------

    [2010-01-08 07:12:52] jon

    -Status: Analyzed
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on
    pear.php.net by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    Have a look at what I just implemented in SVN.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=16962

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 3, '10 at 7:31a
activeJan 17, '10 at 10:58p
posts9
users2
websitepear.php.net

2 users in discussion

Jon: 5 posts Alec: 4 posts

People

Translate

site design / logo © 2022 Grokbase