Re: SMTP-Email Help

2013-04-29 Thread Steven D'Aprano
On Sun, 28 Apr 2013 23:39:53 -0700, root.phidgets wrote: > Hi Guys. I need some help with the coding for my program. > > This coding is suppose to sort text file according to the latest date > and send the latest file. Attach it to my email and sent to another > email account. But somehow the pro

Re: smtp

2011-08-08 Thread Terry Reedy
On 8/8/2011 12:45 PM, Verde Denim wrote: I'm running 2.6.5 on a debian base... It didn't seem to matter what is input - I tried using a single recipient as well as multiples (separated by comma). Output appears as - # python send_my_msg.py From: m...@me.com To: y...@you.com

Re: smtp

2011-08-08 Thread Terry Reedy
On 8/8/2011 12:08 PM, Verde Denim wrote: I'm working on learning various aspects of Py coding, and happened to review the smtplib docs this morning. I entered the sample code from http://www.python.org/doc//current/library/smtplib.html When posting about error messages, please specify Python ve

Re: smtp

2011-08-08 Thread Terry Reedy
On 8/8/2011 12:26 PM, Chris Angelico wrote: As a side point: Does anyone else feel that it's potentially confusing to have a function whose parameter has the same name as the function itself? This is straight from the example. Yes. I might change it someday when I can. -- Terry Jan Reedy --

Re: smtp

2011-08-08 Thread Hegedüs , Ervin
hello, > > import smtplib > def prompt(prompt): > return raw_input(prompt).strip() > fromaddr = prompt("From: ")toaddrs = prompt("To: ").split()print > "Enter message, end with ^D (Unix) or ^Z (Windows):" > # Add the From: and To: headers at the start!msg = ("From: %s\r\nTo: > %s\r\n\r\n" >

Re: smtp

2011-08-08 Thread Chris Angelico
On Mon, Aug 8, 2011 at 5:45 PM, Verde Denim wrote: > I'm running 2.6.5 on a debian base... > It didn't seem to matter what is input - > I tried using a single recipient as well as multiples (separated by comma). Since the recipient list is divided using split(), you should separate multiple addre

Re: smtp

2011-08-08 Thread Verde Denim
On Mon, Aug 8, 2011 at 12:26 PM, Chris Angelico wrote: > On Mon, Aug 8, 2011 at 5:08 PM, Verde Denim wrote: > > and it returns - > > "TypeError" with no other information... > > It appears to be generated from the line > > > > msg = ("From: %s\r\nTo: %s\r\n\r\n" > >% (fromaddr, ", ".join

Re: smtp

2011-08-08 Thread Chris Angelico
On Mon, Aug 8, 2011 at 5:08 PM, Verde Denim wrote: > and it returns - > "TypeError" with no other information... > It appears to be generated from the line > > msg = ("From: %s\r\nTo: %s\r\n\r\n" >% (fromaddr, ", ".join(toaddrs))) > > But I'm not sure why... > I transcribed pieces manuall

Re: smtp - python

2011-06-09 Thread Josias L . Gonçalves
Thank you. The question is that. Get the messages that was sended and save in maildir format. One more question... testing here, has the smtpd.pureproxy support stream username and password for smtp authentication ?. I read some doc and don't find anything about. -- http://mail.python.org/mailman/

Re: smtp - python

2011-06-09 Thread Adam Tauno Williams
On Wed, 2011-06-08 at 17:18 -0300, Josias L.G wrote: > Hi for all, > I'm very newbie in python and is very good language. > I'm trying to adopt a example: > import smtpd > import asyncore > server = smtpd.PureProxy(('127.0.0.1', 1025), ('mail', 25)) > asyncore.loop() > I'm trying to copy the email

Re: SMTP

2009-08-07 Thread Oli Schacher
Sarmad George schrieb: > msg = "Hello World" Your sending your message without any headers (no subject etc). So probably your message lands in the recipients spam folder. Try: msg = """To: recipi...@example.com Subject: hello world Hello there""" The blank line between the headers and the bod

Re: SMTP

2009-08-06 Thread Gabriel Genellina
En Fri, 07 Aug 2009 00:21:34 -0300, Sarmad George escribió: Good day all I am new to the Python list Welcome! My question is here not Python as much as it is in servers I have a code to send an email through my SMTP server - comcast Boston fromaddrs = "**" toaddrs = "sgeo...@coe.neu.

Re: SMTP via GMAIL

2008-09-19 Thread Grant Edwards
On 2008-09-19, Steve Holden <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2008-09-18, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >>> In message >>> <[EMAIL PROTECTED]>, sui >>> wrote: >>> Traceback (most recent call last): File "mail5.py", line 21, in session = s

Re: SMTP via GMAIL

2008-09-19 Thread Steve Holden
Grant Edwards wrote: > On 2008-09-18, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >> In message >> <[EMAIL PROTECTED]>, sui >> wrote: >> >>> Traceback (most recent call last): >>> File "mail5.py", line 21, in >>> session = smtplib.SMTP(SMTPserver,port) >>> File "/usr/local/lib/python2.5

Re: SMTP via GMAIL

2008-09-18 Thread Chris Babcock
> >> Traceback (most recent call last): > >> File "mail5.py", line 21, in > >> session = smtplib.SMTP(SMTPserver,port) > >> File "/usr/local/lib/python2.5/smtplib.py", line 244, in __init__ > >> (code, msg) = self.connect(host, port) > >> File "/usr/local/lib/python2.5/smtplib.py",

Re: SMTP via GMAIL

2008-09-17 Thread Grant Edwards
On 2008-09-18, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message ><[EMAIL PROTECTED]>, sui > wrote: > >> Traceback (most recent call last): >> File "mail5.py", line 21, in >> session = smtplib.SMTP(SMTPserver,port) >> File "/usr/local/lib/python2.5/smtplib.py", line 244, in __ini

Re: SMTP via GMAIL

2008-09-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, sui wrote: > Traceback (most recent call last): > File "mail5.py", line 21, in > session = smtplib.SMTP(SMTPserver,port) > File "/usr/local/lib/python2.5/smtplib.py", line 244, in __init__ > (code, msg) = self.connect(host, port) > File "/usr/local/li

Re: SMTP via GMAIL

2008-09-17 Thread sui
On Aug 7, 12:40 am, mmm <[EMAIL PROTECTED]> wrote: > On Aug 5, 12:18 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > > > >But when using smtp.gmail.com as the server I learned that any > > >@gmail.com address in the Cc: text block would > > >receive mail even if I changed the code to have the RECEIVE

Re: SMTP via GMAIL

2008-08-06 Thread mmm
On Aug 5, 12:18 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > >But when using smtp.gmail.com as the server I learned that any > >@gmail.com address in the  Cc: text block would > >receive mail even if I changed the code to have the RECEIVERS list to > >ignore the CC addresses or not include the gma

Re: SMTP via GMAIL

2008-08-04 Thread Tim Roberts
mmm <[EMAIL PROTECTED]> wrote: > >After reading about and using the smtplib module, I thought code such >as below would ignore the 'Cc: ' body line below when sending messages >and instead simply use the RECEIVERS list Correct. It is required by the SMTP spec to behave that way. >But when using

Re: SMTP via GMAIL

2008-08-02 Thread binaryjesus
i have a lot of experience in gmail. i use it to store 100GB's of server backup on it. the form: field will be equal to the gmail acc u login with. you are not clear with ur cc: so i cant offer any help on it. but u can include multiple addresses in the To: and use Bcc: since python doesnt inclu

Re: SMTP Sending Mail Problem

2008-01-28 Thread the_ricka
I added a longer text file with vocabulary typically used in our office and the email sent successfully. The crazy thing is I had already checked all the spam filters and queues in Exchange, and the older messages seem to have disappeared. Sorry for the post, I thought I was going crazy for a bi

Re: SMTP Sending Mail Problem

2008-01-28 Thread Gabriel Genellina
On 28 ene, 14:15, the_ricka <[EMAIL PROTECTED]> wrote: > However, whenever I try to read more than one line from the file, the > email is not being delivered.  The only reason I know this is because > I tried just reading in the first line of the text file, and the email > sent fine.  Right now I

Re: smtp debugging methods

2007-09-14 Thread Tim Roberts
Sean Nakasone <[EMAIL PROTECTED]> wrote: > >I'm having trouble with sending smtp mail. It's hanging after the >smtplib.SMTP() line. It doesn't works from home but not from work. What's >the best way to debug this? It's quite possible that your network at work has a firewall blocking these port

Re: smtp debugging methods

2007-09-14 Thread Tim Williams
On 14/09/2007, Sean Nakasone <[EMAIL PROTECTED]> wrote: > I'm having trouble with sending smtp mail. It's hanging after the > smtplib.SMTP() line. It doesn't works from home but not from work. What's > the best way to debug this? > > # Here's my script > import smtplib > msg = "Subject: Hello\n\n

Re: smtp debugging methods

2007-09-14 Thread Jon Ribbens
On 2007-09-14, Sean Nakasone <[EMAIL PROTECTED]> wrote: > I'm having trouble with sending smtp mail. It's hanging after the > smtplib.SMTP() line. It doesn't works from home but not from work. What's > the best way to debug this? > > # Here's the error server = smtplib.SMTP("smtp.gmail.com

Re: SMTP server w/o using Twisted framework

2007-07-06 Thread Steve Holden
Gerhard Häring wrote: > _spitFIRE wrote: >> [looking up DNS MX records] >> Thanks for the pointer. However, as I said currently, I can't use >> anything other than the standard libraries. > > Sure you can. You just need to get rid of the "only standard library" > requirement rule. > > That works

Re: SMTP server w/o using Twisted framework

2007-07-06 Thread Gerhard Häring
_spitFIRE wrote: > [looking up DNS MX records] > Thanks for the pointer. However, as I said currently, I can't use > anything other than the standard libraries. Sure you can. You just need to get rid of the "only standard library" requirement rule. That works best by showing the alternatives to

Re: SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
On Jul 5, 2:37 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote: > You could try pyDNS (http://pydns.sourceforge.net). You should simply > be able to call the 'DNS.mxlookup' function. The other option would > be twisted.names... > Thanks for the pointers. > What about simply running an SMTP server o

Re: SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
On Jul 5, 2:21 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > You need to do a DNS MX lookup. There's nothing in the Python stdlib > which provides this functionality. There are several libraries available > which do this, though (Twisted among them ;). You can probably find them > with a

Re: SMTP server w/o using Twisted framework

2007-07-05 Thread Jeff McNeil
Inline... On 7/5/07, _spitFIRE <[EMAIL PROTECTED]> wrote: > On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote: > > If you just want to send mail, you should be able to use the standard > > smtplib module (http://docs.python.org/lib/module-smtplib.html). If > > your recipients are on the I

Re: SMTP server w/o using Twisted framework

2007-07-05 Thread Jean-Paul Calderone
On Thu, 05 Jul 2007 18:56:49 -, _spitFIRE <[EMAIL PROTECTED]> wrote: >On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote: >> If you just want to send mail, you should be able to use the standard >> smtplib module (http://docs.python.org/lib/module-smtplib.html). If >> your recipients ar

Re: SMTP server w/o using Twisted framework

2007-07-05 Thread _spitFIRE
On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote: > If you just want to send mail, you should be able to use the standard > smtplib module (http://docs.python.org/lib/module-smtplib.html). If > your recipients are on the Internet, you would need to handle MX > resolution yourself. > How

Re: SMTP server w/o using Twisted framework

2007-07-05 Thread Jeff McNeil
If you just want to send mail, you should be able to use the standard smtplib module (http://docs.python.org/lib/module-smtplib.html). If your recipients are on the Internet, you would need to handle MX resolution yourself. I know you said you want to avoid a relay server, but it's probably the be

Re: smtp server simulation using Python

2007-06-24 Thread William Gill
Dave Borne wrote: >> I have a (web) development computer w/o an SMTP server and want to test >> form generated e-mail using a dummy SMTP server that delivers the mail >> message to a file, or better yet, to a text editor instead of actually >> sending it. > > Here's a quick and dirty script I us

Re: smtp server simulation using Python

2007-06-18 Thread Dave Borne
> I have a (web) development computer w/o an SMTP server and want to test > form generated e-mail using a dummy SMTP server that delivers the mail > message to a file, or better yet, to a text editor instead of actually > sending it. Here's a quick and dirty script I use this for email testing pur

Re: smtp server simulation using Python

2007-06-18 Thread Tim Williams
On 17/06/07, William Gill <[EMAIL PROTECTED]> wrote: > I have a (web) development computer w/o an SMTP server and want to test > form generated e-mail using a dummy SMTP server that delivers the mail > message to a file, or better yet, to a text editor instead of actually > sending it. Is it possi

Re: smtp server simulation using Python

2007-06-17 Thread Josiah Carlson
William Gill wrote: > I have a (web) development computer w/o an SMTP server and want to test > form generated e-mail using a dummy SMTP server that delivers the mail > message to a file, or better yet, to a text editor instead of actually > sending it. Is it possible to extend the DebuggingSer

Re: SMTP Test Rig ( SMTPRIG.PY v1.0 )

2005-06-11 Thread richard
Tim Williams wrote: > After a few posts recently, I have put together an SMTP test rig that > will > receive emails and either store them to a file, write them to a console, > or both. > > Does anyone have any suggestions on where I can get it hosted as a > utility for general public use? http

RE: SMTP Test Rig

2005-06-10 Thread Hughes, Chad O
Thanks very much it works great and does exactly what I need for a test I have to perform. I started teaching myself the SMTP protocol last night and it does not look to hard. But this saves me a great deal of time an effort. I hope you can find a good place to host it, as it is the only example

Re: SMTP Test Rig ( SMTPRIG.PY v1.0 )

2005-06-10 Thread dowskimania
Tim Williams wrote: > After a few posts recently, I have put together an SMTP test rig that will > receive emails and either store them to a file, write them to a console, or > both. Sounds interesting. > Does anyone have any suggestions on where I can get it hosted as a utility > for general

Re: SMTP Test Rig ( SMTPRIG.PY v1.0 )

2005-06-10 Thread Martin Franklin
Tim Williams wrote: > After a few posts recently, I have put together an SMTP test rig that will > receive emails and either store them to a file, write them to a console, or > both. > > Does anyone have any suggestions on where I can get it hosted as a utility > for general public use? > > TI

Re: SMTP help please

2005-06-07 Thread Mike Meyer
Martin Franklin <[EMAIL PROTECTED]> writes: > server = smtplib.SMTP("mailserver.somewhere.com") Why are you beating up Kee's mail server (hint: "whois somewhere.com")? See RFC 2606 http://www.ietf.org/rfc/rfc2606.txt > and search for "example.com" for how to pick example domain names properly.

Re: SMTP help please

2005-06-07 Thread Ivan Shevanski
>From: Larry Bates <[EMAIL PROTECTED]> >To: Ivan Shevanski <[EMAIL PROTECTED]> >Subject: Re: SMTP help please >Date: Tue, 07 Jun 2005 07:39:01 -0500 > >I have found that the SmtpWriter class "hides" all the >complexity in creating emails like you

Re: SMTP help please

2005-06-07 Thread Larry Bates
I have found that the SmtpWriter class "hides" all the complexity in creating emails like you want to send. Check it out here: http://motion.sourceforge.net/related/send_jpg.py HTH, Larry Bates Syscon, Inc. Ivan Shevanski wrote: > I really can't figure out anything about the SMTP module. . .I

Re: SMTP help please

2005-06-07 Thread Martin Franklin
Tim Williams wrote: > - Original Message - > From: "Tim Williams" <[EMAIL PROTECTED]> > >>try: >>s.close() >>except >>pass > > > Typo!! > > That should be s.quit() not s.close() > > :) > > > > and perhaps put into a finally: Mart -- http://mail.python.org/mailma

Re: SMTP help please

2005-06-07 Thread Tim Williams
- Original Message - From: "Tim Williams" <[EMAIL PROTECTED]> > > try: > s.close() > except > pass Typo!! That should be s.quit() not s.close() :) -- http://mail.python.org/mailman/listinfo/python-list

Re: SMTP help please

2005-06-07 Thread Tim Williams
- Original Message - From: "Martin Franklin" <[EMAIL PROTECTED]> > server.sendmail(fromaddr, toaddrs, msg) You can use this if you don't need to worry about whether the email was successfully sent to all recipients. Otherwise, you need something like this (untested and partly copied

Re: SMTP help please

2005-06-07 Thread Martin Franklin
Ivan Shevanski wrote: > I really can't figure out anything about the SMTP module. . .I think I'm > in over my head( Im pretty new to python). Can someone show me a > really(and I mean REALLY) basic tutorial for smtp or explain it? > > program: > I want to make my program have a feedback form at

Re: SMTP help please

2005-06-07 Thread Simon Brunning
On 6/7/05, Ivan Shevanski <[EMAIL PROTECTED]> wrote: > I really can't figure out anything about the SMTP module. . .I think I'm in > over my head( Im pretty new to python). Can someone show me a really(and I > mean REALLY) basic tutorial for smtp or explain it?

Re: smtp question

2005-01-06 Thread Tim Roberts
"Philippe C. Martin" <[EMAIL PROTECTED]> wrote: >Hi, > >I am testing the smtp module and have the following question: > >in the code below (taken from net sample) prior to adding the "Subject:" >field, the email client found the "From" and the "To". Without the >"Subject:" field on I get this: > >

Re: smtp question

2005-01-05 Thread Max M
Philippe C. Martin wrote: Hi, I am testing the smtp module and have the following question: in the code below (taken from net sample) prior to adding the "Subject:" field, the email client found the "From" and the "To". Without the "Subject:" field on I get this: Email client = Evolution: the "From

Re: smtp question - using email module

2005-01-05 Thread Philippe C. Martin
Thank you all for your help - an yes! the email module is _very_ nice. Regards, Philippe -- *** Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: smtp question

2005-01-05 Thread Mike Meyer
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > Hi, > > I am testing the smtp module and have the following question: > > in the code below (taken from net sample) prior to adding the "Subject:" > field, the email client found the "From" and the "To". Without the > "Subject:" field on I get thi

Re: smtp question

2005-01-05 Thread Kartic
Philippe, Looks like the problem lies where you have added the Subject header. You have terminated it with a \n\n and then your From and To headers. You may want to rewrite it as: server.sendmail(fromaddr, toaddrs, 'Subject:from python\r\n'+msg) Why dont you consider using the email module - ht