Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [Python] Very Simple Email Send (https://thetfp.com/tfp/tilted-technology/77424-python-very-simple-email-send.html)

Artsemis 11-30-2004 01:39 PM

[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?

theFez 11-30-2004 04:44 PM

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.

sailor 11-30-2004 06:02 PM

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 :)


All times are GMT -8. The time now is 08:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, 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