Hi All,<br>          <br><br>import smtplib<br><br> mail="<a href="mailto:abc@xyz.com" target="_blank">abc@xyz.com</a>";<br>    subject="Hai";<br>    msg = 'Some Text';<br>    <br>    smtp_server = smtplib.SMTP( 'mail.%s' % mail.split( '@' )[-1] )<br>

    smtp_server.sendmail( <br>          mail<br>        , [ mail ]<br>        , 'Subject: %s\n' % subject<br>            + 'To: %s\n' % mail<br>            + '\n'<br>            + msg <br>        )<br>

<br><br>I am using above  code to send an Email, for this i am not installed any SMTP setup my local , I just given import smtplib<br>and I am getting following error<br><br>showing error at<br> <b>smtp_server = smtplib.SMTP( 'mail.%s' % mail.split( '@' )[-1] )</b> this line<br>
<br>can any one tell that how to give STMP server setup in my local and run successfully the above code.<br><br><pre><b></b>Traceback (most recent call last):<br>  File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 500, in __call__<br>
    handler.post(*groups)<br>  File "C:\Documents and Settings\desk\Desktop\apps\temp\main.py", line 129, in post<br>    smtp_server = smtplib.SMTP( 'mail.%s' % mail.split( '@' )[-1] )<br>  File "C:\Python26\lib\smtplib.py", line 239, in __init__<br>
    (code, msg) = self.connect(host, port)<br>  File "C:\Python26\lib\smtplib.py", line 295, in connect<br>    self.sock = self._get_socket(host, port, self.timeout)<br>  File "C:\Python26\lib\smtplib.py", line 273, in _get_socket<br>
    return socket.create_connection((port, host), timeout)<br>AttributeError: 'module' object has no attribute 'create_connection'<br></pre><br clear="all"><br>-- <br>Regards<br>Kalyan<br><br>