Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to send an email with python
    text
    copied!<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/11257185/send-email-with-python">Send email with python</a> </p> </blockquote> <p>I'm trying so send an email with python but when I run the script it take a minute or two then I get this error:</p> <pre><code>Traceback (most recent call last): File "./emailer", line 19, in &lt;module&gt; server = smtplib.SMTP(SERVER) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 239, in __init__ (code, msg) = self.connect(host, port) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 295, in connect self.sock = self._get_socket(host, port, self.timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 273, in _get_socket return socket.create_connection((port, host), timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 512, in create_connection raise error, msg socket.error: [Errno 60] Operation timed out </code></pre> <p>This is the script:</p> <pre><code>#!/usr/bin/env python import smtplib SERVER = 'addisonbean.com' FROM = 'myemail@gmail.com' TO = ['myemail@gmail.com'] SUBJECT = 'Hello!' message = """\ Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla """ server = smtplib.SMTP(SERVER) server.sendmail(FROM, TO, message) server.quit() </code></pre> <p>I also tried my site IP address as the server but that did the same thing.</p> <p>Could someone tell me why it does this and how to fix this? Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload