Can't use perl to SMTP to google

Discussion in 'Linux Networking' started by Earie, Mar 6, 2012.

  1. Earie

    Earie Guest

    Can anyone make any sense out of this:

    [[email protected] test]$ telnet smtp.gmail.com 465
    Trying 74.125.79.109...
    Connected to smtp.gmail.com (74.125.79.109).
    Escape character is '^]'.
    ^]
    telnet> Connection closed.
    [[email protected] test]$ perl -e 'use Net::SMTP::SSL;print Net::SMTP::SSL-
    aa: [[email protected] test]$


    It doesn't seem as a network problem, as telnet works. It's imply that
    Net::SMTP fails to create a socket, and does so silently (oddly
    enough, it's designed to simply return undef in such cases. No $!
    set). Any ideas???

    Any help will be greatly appreciated.
     
    Earie, Mar 6, 2012
    #1
    1. Advertisements

  2. Earie

    Chris Davies Guest

    Does "works for me" help?

    $ perl -e 'use Net::SMTP::SSL;print Net::SMTP::SSL->new("smtp.gmail.com",Port=>465) || "aa: $!";'; echo
    Net::SMTP::SSL=GLOB(0x9a52050)

    $ perl -MNet::SMTP::SSL -MIO::Socket::SSL -MNet::SSLeay -e 'print join(", ", $Net::SMTP::SSL::VERSION, $IO::Socket::SSL::VERSION, $Net::SSLeay::VERSION), "\n"'
    1.01, 1.33, 1.36

    Chris
     
    Chris Davies, Mar 6, 2012
    #2
    1. Advertisements

  3. Earie

    Earie Guest

    Yes it does!!! (would you believe?)
    I've updated these, and now it really works. Thanks a lot!!
     
    Earie, Mar 6, 2012
    #3
  4. Earie

    Chris Davies Guest

    Does "works for me" help?

    Pleased to hear it. I wasn't sure if I should post, but then thought it
    might be worth comparing versions...

    ....and it seems to have been useful after all!

    Glad to hear you're sorted
    Chris
     
    Chris Davies, Mar 6, 2012
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.