Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 11-30-2004, 01:39 PM   #1 (permalink)
Insane
 
Location: West Virginia
[Python] Very Simple Email Send

Code:
from smtplib import *

outbox = SMTP('mail.pcwv.com')
MyAddr = "jay@pcwv.com"
Target = "jay@pcwv.com"
outbox.sendmail(MyAddr,Target,"Hi There")
Everytime i try to execute that, I get a "Connection unexpectedy closed". Just to verify, I have also copy and pasted many other senders off internet with no luck.

Anyone see the issue here? Can it be anything other than the mail server not allowing me to do this?
__________________

- Artsemis
~~~~~~~~~~~~~~~~~~~~
There are two keys to being the best:
1.) Never tell everything you know
Artsemis is offline  
Old 11-30-2004, 04:44 PM   #2 (permalink)
Crazy
 
Location: here and there
I'm just learning python so i cant really comment on the code. I know that from the interpreter i have to do this:

outbox = smtplib.SMTP('mail.myserver.com')

many isps disable relaying so you cant send from a mailserver other than theirs. You may want to try and set-up an email account using the server just to make sure you can send from the account.

Also if your server requires authorization, that may be a problem.
__________________
# chmod 111 /bin/Laden
theFez is offline  
Old 11-30-2004, 06:02 PM   #3 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Quote:
Originally Posted by theFez
many isps disable relaying so you cant send from a mailserver other than theirs. You may want to try and set-up an email account using the server just to make sure you can send from the account.

Also if your server requires authorization, that may be a problem.
Without knowing anything about Python, Im going to agree with that. All the PHP code Ive ever written dealing with email doesnt work on my test servers for just that reason, but works fine when thrown onto a server thats able to send mail
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
 

Tags
email, python, send, simple


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 05:01 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76