Re: Socket Timeout and SMTP

Discussion in 'Python' started by Tim Williams, Jul 23, 2004.

  1. Tim Williams

    Tim Williams Guest

    ----- Original Message -----
    From: "Steve" <>


    > Hi Tim,
    > On Fri, 23 Jul 2004 12:35:03 +0100, Tim Williams <>

    wrote:
    > > (python newbie)
    > >
    > > Is it possible to individually set the socket timeout of a connection
    > > created by smtplib, rather than use the socket.setdefaulttimeout()

    value
    > > used by the rest of the prog/script?
    > > def smtp_client(mx, from, to_list, msg):
    > > server = smtplib.SMTP(mx)

    > server.sock.settimeout(XX)


    Perfect, thanks Steve, I was trying

    server = smtplib.SMTP(mx)
    server.settimeout(XX)

    the correct version is now in my code, tested and working.

    > HTH


    most certainly did :)

    Tim
    Tim Williams, Jul 23, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Williams

    Socket Timeout and SMTP

    Tim Williams, Jul 23, 2004, in forum: Python
    Replies:
    0
    Views:
    474
    Tim Williams
    Jul 23, 2004
  2. p.
    Replies:
    4
    Views:
    592
    Giampaolo Rodola'
    Jan 10, 2009
  3. Laszlo Nagy
    Replies:
    1
    Views:
    4,808
    Mark Wooding
    Jan 27, 2009
  4. Jean-Paul Calderone
    Replies:
    0
    Views:
    960
    Jean-Paul Calderone
    Jan 27, 2009
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,279
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page