#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    45
    Rep Power
    12

    Net::SMTP Unexpected EOF on command channel


    I am using Net::SMTP to send emails.
    I have two email addresses in an array, which I loop through to send.

    The first one goes through, but not the second one does not show up in my inbox.

    I turned Net::SMTP Debug = 1, here is where it stops (from STDERR):

    ====
    ....entire message truncated....

    Net::SMTP=GLOB(0x863af64)>>>
    Net::SMTP=GLOB(0x863af64)>>> .
    Net::SMTP=GLOB(0x863af64)<<< 451 See http://pobox.com/~djb/docs/smtplf.html.
    Net::SMTP=GLOB(0x863af64)>>> QUIT
    [Wed Jul 2 18:28:39 2003] newsletter.cgi: Net::SMTP: Unexpected EOF on command channel at /path/to/HTML/Newsletter.pm line 92
    ===

    Any ideas?
    Find out where your web site ranks in Google and Inktomi, free!
    Top25Web.com: page rank report
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    45
    Rep Power
    12
    i fixed the problem by sending \r\n at the end of every datasend() line.

    seems to be okay now.
    Find out where your web site ranks in Google and Inktomi, free!
    Top25Web.com: page rank report
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    29
    Rep Power
    0
    I also got this mysterious error message "unexpected eof on command channel" while sending a mail using Net::SMTP.
    What I was trying to do was to send a base64-encoded attachment.

    I finally solved the problem by calling $smtpobject->datasend(...) separately for each line of my base64 ecoded data instead of once with the whole bunch of data as one parameter.

    Hope this might help someone with the same problem. :-)

    flo
  6. #4
  7. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    http://cr.yp.to/docs/smtplf.html explains the problem.
    Alex
    (http://www.alex-greg.com)

IMN logo majestic logo threadwatch logo seochat tools logo