Re: Getting "LazyImporter' object is not callable" error when trying to send email using python smtplib

2018-03-26 Thread Sum
Thanks Steve for your inputs. Now I am able to run the code successfully. # Made changes to import statements as below: from email.mime.base import MIMEBase from email.mime.text import MIMEText Apologies for the typo and indentation error in above mail. Regards, Sumit On Mon,

Re: Getting "LazyImporter' object is not callable" error when trying to send email using python smtplib

2018-03-26 Thread Steven D'Aprano
On Mon, 26 Mar 2018 16:47:26 +0530, Sum wrote: > Hi, > > Getting "LazyImporter' object is not callable" error. I have enabled > allow less secure app setting in sender gmail. > > Code : The code you show is not the same as the code you are actually running. The error message you give says: Fi

Getting "LazyImporter' object is not callable" error when trying to send email using python smtplib

2018-03-26 Thread Sum
Hi, Getting "LazyImporter' object is not callable" error. I have enabled allow less secure app setting in sender gmail. Code : import smtplib from email import MIMEBase from email import MIMEText from email.mime.multipart import MIMEMultipart from email import Encoders import os

RE: smtplib TimeoutError not catch

2016-10-12 Thread Joaquin Alzola
>Not surprisingly, the exception you should catch is simply TimeoutError: >try: >server.sendmail(sender, receivers, msg.as_string()) >except TimeoutError as e: >print("SMTP could not be contacted: %s" % e) >finally: > server.quit() The error was thrown by a

Re: smtplib TimeoutError not catch

2016-10-12 Thread MRAB
On 2016-10-12 14:21, Joaquin Alzola wrote: Hi Guys Try to connect to the smtp via smtplib. The connection is down because the Firewall has not been open yet so the exception is something that should appear. Now I want to catch this timeout in case error happens in future. Here the exception

smtplib TimeoutError not catch

2016-10-12 Thread Joaquin Alzola
Hi Guys Try to connect to the smtp via smtplib. The connection is down because the Firewall has not been open yet so the exception is something that should appear. Now I want to catch this timeout in case error happens in future. Here the exception trace. [2016-10-12 14:14:06,289] ERROR in

Re: [smtplib] how to assure login was succesful?

2016-05-25 Thread dieter
maurice writes: > Once my python script reaches the point where I login in my email account > with: server.login(username,password) (where server server = > smtplib.SMTP('smtp.office365.com:587')), it returns a tuple like this: > > (235, > '2.7.0 Authentication successful target host [address h

[smtplib] how to assure login was succesful?

2016-05-24 Thread maurice
Hello to all. I have the following question: Once my python script reaches the point where I login in my email account with: server.login(username,password) (where server server = smtplib.SMTP('smtp.office365.com:587')), it returns a tuple like this: (235, '2.7.0 Authentication successful tar

smtplib not working when python run under windows service via Local System account

2016-05-05 Thread loial
I have a python 2.7.10 script which is being run under a windows service on windows 2012 server . The python script uses smtplib to send an email. It works fine when the windows service is run as a local user, but not when the windows service is configured to run as Local System account. I get

Re: smtplib not working as expected

2014-12-27 Thread Juan Christian
Denis it was already resolved, check my message above. ^^ -- https://mail.python.org/mailman/listinfo/python-list

Re: smtplib not working as expected

2014-12-27 Thread Tim Chase
On 2014-12-27 14:28, Denis McMahon wrote: > On Sat, 27 Dec 2014 02:52:39 +, Juan Christian wrote: > > reply: b'550 SMTP is available only with SSL or TLS connection > > enabled.\r\n' > > reply: retcode (550); Msg: b'SMTP is available only with SSL or > > TLS connection enabled.' > > ^^ hav

Re: smtplib not working as expected

2014-12-27 Thread Denis McMahon
On Sat, 27 Dec 2014 02:52:39 +, Juan Christian wrote: > So, I changed the code how you said, but still not working. > Traceback: > > reply: b'550 SMTP is available only with SSL or TLS connection > enabled.\r\n' > reply: retcode (550); Msg: b'SMTP is available only with SSL or TLS > connectio

Re: smtplib not working as expected

2014-12-27 Thread Juan Christian
On Sat Dec 27 2014 at 1:23:12 AM Vincent Vande Vyvre < vincent.vande.vy...@telenet.be> wrote: Try with the TLS: Many thanks, working like a charm, code: server = smtplib.SMTP('smtp.mail.ru') server.starttls() server.ehlo() server.login('SENDER EMAIL GOES HERE', 'PASSWD GOES HERE') server.sendmail

Re: smtplib not working as expected

2014-12-26 Thread Vincent Vande Vyvre
he default, it succeeded. So, I changed the code how you said, but still not working. Code: import smtplib fromaddr = 'mksfjnsfji4433j4...@bk.ru <mailto:mksfjnsfji4433j4...@bk.ru>' toaddrs = ['mksfjnsfji4433j4...@bk.ru <mailto:mksfjnsfji4433j4...@bk.ru>'] msg = ("

Re: smtplib not working as expected

2014-12-26 Thread Juan Christian
mport smtplib fromaddr = 'mksfjnsfji4433j4...@bk.ru' toaddrs = ['mksfjnsfji4433j4...@bk.ru'] msg = ("From: %s\r\nTo: %s\r\n\r\n" % (fromaddr, ", ".join(toaddrs))) msg = msg + 'test' server = smtplib.SMTP('smtp.mail.ru') server.set_

Re: smtplib not working as expected

2014-12-26 Thread MRAB
On 2014-12-27 00:39, Juan Christian wrote: I have the following test code: import smtplib fromaddr = 'mksfjnsfji4433j4...@bk.ru <mailto:mksfjnsfji4433j4...@bk.ru>' toaddrs = ['mksfjnsfji4433j4...@bk.ru <mailto:mksfjnsfji4433j4...@bk.ru>'] ms

smtplib not working as expected

2014-12-26 Thread Juan Christian
I have the following test code: import smtplib fromaddr = 'mksfjnsfji4433j4...@bk.ru' toaddrs = ['mksfjnsfji4433j4...@bk.ru'] msg = ("From: %s\r\nTo: %s\r\n\r\n" % (fromaddr, ", ".join(toaddrs))) msg = msg + 'test' print("Messa

Re: error importing smtplib

2012-11-19 Thread Eric Frederich
I can do this in stand alone programs because my code does the import and calls the login function so I can control the order of things. Unfortunately stand alone programs are not the only ways in which I am using these Python bindings. You can customize and extend this 3rd party application at va

Re: error importing smtplib

2012-11-17 Thread Dieter Maurer
Eric Frederich writes: > ... > So I'm guessing the problem is that after I log in, the process has a > conflicting libssl.so file loaded. > Then when I try to import smtplib it tries getting things from there and > that is where the errors are coming from. > > Th

Re: error importing smtplib

2012-11-16 Thread Terry Reedy
On 11/16/2012 2:37 PM, Eric Frederich wrote: So I inspected the process through /proc//maps That seemed to show what libraries had been loaded (though there is probably an easier way to do this). In any case, I found that if I import smtplib before logging in I see these get loaded

Re: error importing smtplib

2012-11-16 Thread Dieter Maurer
Eric Frederich writes: > I created some bindings to a 3rd party library. > I have found that when I run Python and import smtplib it works fine. > If I first log into the 3rd party application using my bindings however I > get a bunch of errors. > > What do you think this 3rd

Re: error importing smtplib

2012-11-16 Thread Eric Frederich
So I inspected the process through /proc//maps That seemed to show what libraries had been loaded (though there is probably an easier way to do this). In any case, I found that if I import smtplib before logging in I see these get loaded... /opt/foo/python27/lib/python2.7/lib-dynload/_ssl.so

Re: error importing smtplib

2012-11-15 Thread Terry Reedy
On 11/15/2012 1:48 PM, Eric Frederich wrote: Thanks for the idea. sys.path was the same before and after the login Too bad. That seems to be a typical cause of import failure. What else should I be checking? No idea. You are working beyond my knowledge. But I might either look at the foo-l

Re: error importing smtplib

2012-11-15 Thread Eric Frederich
11:57 AM, Terry Reedy wrote: > On 11/15/2012 9:38 AM, Eric Frederich wrote: > >> Hello, >> >> I created some bindings to a 3rd party library. >> I have found that when I run Python and import smtplib it works fine. >> If I first log into the 3rd party application u

Re: error importing smtplib

2012-11-15 Thread Eric Frederich
gt;> I have found that when I run Python and import smtplib it works fine. >> If I first log into the 3rd party application using my bindings however >> I get a bunch of errors. >> >> What do you think this 3rd party login could be doing that would affect >> the

Re: Getting "empty" attachment with smtplib

2012-11-15 Thread Tobiah
I can already say that "smtplib" is not to blame. It is (mostly) unconcerned with the internal structure of the message -- and by itself will not empty attachments. On the advice of a co-worker, I tried using web2py's gluon.tools.Mail. It was easier to accomplish the

Re: error importing smtplib

2012-11-15 Thread Terry Reedy
On 11/15/2012 9:38 AM, Eric Frederich wrote: Hello, I created some bindings to a 3rd party library. I have found that when I run Python and import smtplib it works fine. If I first log into the 3rd party application using my bindings however I get a bunch of errors. What do you think this 3rd

error importing smtplib

2012-11-15 Thread Eric Frederich
Hello, I created some bindings to a 3rd party library. I have found that when I run Python and import smtplib it works fine. If I first log into the 3rd party application using my bindings however I get a bunch of errors. What do you think this 3rd party login could be doing that would affect

Re: Getting "empty" attachment with smtplib

2012-11-14 Thread Dieter Maurer
processed if possible) and look at its structure. If it is conformant to the MIME standard, then "Thunderbird" made a mistake; otherwise, something went wrong with the message construction. I can already say that "smtplib" is not to blame. It is (mostly) unconcerned with the inte

Re: Getting "empty" attachment with smtplib

2012-11-14 Thread Tobiah
I just found out that the attachment works fine when I read the mail from the gmail website. Thunderbird complains that the attachment is empty. Thanks, Toby On 11/14/2012 09:51 AM, Tobiah wrote: I've been sending an email blast out with smtplib and it's been working fine. I'

Re: smtplib is broken when using TLS

2011-05-19 Thread Giampaolo Rodolà
Please file a ticket on: http://bugs.python.org/ Regards, --- Giampaolo http://code.google.com/p/pyftpdlib/ http://code.google.com/p/psutil/ 2011/5/17 nirinA raseliarison : > i think this has the same origin as the ftplib test failure. > > Python 3.2.1rc1 (default, May 17 2011, 22:01:34) > [GCC

smtplib is broken when using TLS

2011-05-17 Thread nirinA raseliarison
i think this has the same origin as the ftplib test failure. Python 3.2.1rc1 (default, May 17 2011, 22:01:34) [GCC 4.6.0] on linux2 Type "copyright", "credits" or "license()" for more information. RESTART send: 'ehlo [127.0.0

Re: smtplib with Google

2010-09-13 Thread narke
On 2010-09-13, member thudfoo wrote: > On Mon, Sep 13, 2010 at 9:20 AM, narke wrote: >> >> Hi, >> >> Can anyone please show me a workable example that can let me use >> google's smtp server to send out a message?  Thanks. >> > > Go here: > > http://code.activestate.com/recipes/langs/python/

Re: smtplib with Google

2010-09-13 Thread member thudfoo
On Mon, Sep 13, 2010 at 9:20 AM, narke wrote: > > Hi, > > Can anyone please show me a workable example that can let me use > google's smtp server to send out a message?  Thanks. > Go here: http://code.activestate.com/recipes/langs/python/ and search for this gmail -- http://mail.py

smtplib with Google

2010-09-13 Thread narke
Hi, Can anyone please show me a workable example that can let me use google's smtp server to send out a message? Thanks. -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer narke -- http://mail.python.org/mailman/listinfo/python-list

Re: mail sending -- smtplib

2010-09-07 Thread Kurian Thayil
s amazing > programming language. I was trying to send mails using smtplib module, so > did some google and found a code snippet. The mail gets sent, but doesn't > come in the right format when a for-loop is introduced (Not MIME standard?). > Without the for-loop the script works fine. Can anyon

mail sending -- smtplib

2010-09-06 Thread Kurian Thayil
Hi All, I am a newbie in python. Just 2-3 days old wanting to learn this amazing programming language. I was trying to send mails using smtplib module, so did some google and found a code snippet. The mail gets sent, but doesn't come in the right format when a for-loop is introduced (Not

Re: Get authentication error while using 'smtplib'

2010-08-22 Thread Mahmood Naderan
n mailing list Sent: Fri, August 20, 2010 6:13:20 PM Subject: Get authentication error while using 'smtplib' I have this script to send an email via SMTP: import smtplib smtpserver = 'smtp.server.com' AUTHREQUIRED = 1# if you need to use SMTP AUTH set to 1 smtpuser = "use

Get authentication error while using 'smtplib'

2010-08-20 Thread Mahmood Naderan
I have this script to send an email via SMTP: import smtplib smtpserver = 'smtp.server.com' AUTHREQUIRED = 1# if you need to use SMTP AUTH set to 1 smtpuser = "username"# for SMTP AUTH, set SMTP username here smtppass = "password"# for SMTP AUTH, set SMTP pas

Re: Problem w/ smtplib

2009-11-21 Thread Victor Subervi
: up (pid 5278) 594565 seconds >> /service/qmail-pop3d/log: up (pid 5279) 594565 seconds >> messages in queue: 0 >> messages in queue but not yet preprocessed: 0 >> >> Please advise. >> TIA, >> V >> > > Hello Victor, > > I'm afraid

Re: Problem w/ smtplib

2009-11-21 Thread Kev Dwyer
ds > messages in queue: 0 > messages in queue but not yet preprocessed: 0 > > Please advise. > TIA, > V > Hello Victor, I'm afraid I don't know much about mail servers, you need to check the server docs or ask on a qmail mailing list. If you really think this is a pyth

Re: Problem w/ smtplib

2009-11-21 Thread Victor Subervi
On Sat, Nov 21, 2009 at 12:04 PM, Kev Dwyer wrote: > On Sat, 21 Nov 2009 08:19:52 -0500, Victor Subervi wrote: > > Hello Victor, > > The information that you have sent comes from the client side of the > transaction, so it isn't possible to tell why the server disconnected. > Assuming that there

Re: Problem w/ smtplib

2009-11-21 Thread Kev Dwyer
On Sat, 21 Nov 2009 08:19:52 -0500, Victor Subervi wrote: Hello Victor, The information that you have sent comes from the client side of the transaction, so it isn't possible to tell why the server disconnected. Assuming that there is an SMTP server listening on port 25, you need to check the

Problem w/ smtplib

2009-11-21 Thread Victor Subervi
session.login(user, passwd) # only if it requires auth 51 header = "Subject: %s \r\nContent-type: text/html; charset=utf-8\r\n\r\n" % subject session *undefined*, *global* *smtplib* = , smtplib.*SMTP* = /usr/lib64/python2.4/smtplib.py in *__init__*(self=, host='localhost&

Re: smtplib upload progress

2009-10-19 Thread Gabriel Genellina
En Mon, 19 Oct 2009 19:33:50 -0300, Guyon Morée escribió: I wanted to use smtplib to send a bunch of files. All good, except I cant monitor the upload progress as far as I can see. So I monkey patched the SMTP.sendall method, which chops up the data and keeps calling a provided callback for

Re: smtplib send mail dns resolve problem

2009-10-19 Thread 星星
t;      my email smtp server hostname:  email-my.local.com > >      ips through dns parse: > >     1.1.1.1 > >     1.1.1.12 > >     1.1.13.1 > >     1.1.1.14 > >     1.1.1.15 > >     ****** > &g

smtplib upload progress

2009-10-19 Thread Guyon Morée
Hi, I wanted to use smtplib to send a bunch of files. All good, except I cant monitor the upload progress as far as I can see. So I monkey patched the SMTP.sendall method, which chops up the data and keeps calling a provided callback for every chunk of data sent. This feels kind of dirty and I

Re: smtplib send mail dns resolve problem

2009-10-19 Thread Gabriel Genellina
1.1.1.12 1.1.13.1 1.1.1.14 1.1.1.15 ** but when i send mail using smtplib, i was always using one ip, no dns re-resolve happened, (for example: only use 1.1.1.12). I checked smtplib src code, but i can't

smtplib send mail dns resolve problem

2009-10-19 Thread 星星
hello everyone, I am using smtplib to send email, and i meet such a problem: my email smtp server hostname can be parsed to 5 ips, for example: ** my email smtp server hostname: email-my.local.com ips through

Re: redoing libgmail interface to "smtplib" blah?

2009-08-16 Thread Dave Angel
Dennis Lee Bieber wrote: On Sat, 15 Aug 2009 23:14:39 -0600, John Haggerty declaimed the following in gmane.comp.python.general: I did detect one problem thus far File "test.py", line 152 if len(args) == 1 and args[0] = "-c": Should have been fine, unless my memory of s

Re: redoing libgmail interface to "smtplib" blah?

2009-08-15 Thread John Haggerty
I did detect one problem thus far File "test.py", line 152 if len(args) == 1 and args[0] = "-c": On Sat, Aug 15, 2009 at 7:23 PM, Dennis Lee Bieber wrote: > On Sat, 15 Aug 2009 14:23:26 -0600, John Haggerty > declaimed the following in gmane.comp.python.general: > > > The following progra

Re: redoing libgmail interface to "smtplib" blah?

2009-08-15 Thread John Haggerty
On Sat, Aug 15, 2009 at 7:23 PM, Dennis Lee Bieber wrote: > On Sat, 15 Aug 2009 14:23:26 -0600, John Haggerty > declaimed the following in gmane.comp.python.general: > > > The following program is theoretically supposed to use a supported > library. > > Issues have come up where the library is no

redoing libgmail interface to "smtplib" blah?

2009-08-15 Thread John Haggerty
The following program is theoretically supposed to use a supported library. Issues have come up where the library is not working and now another interface is being requierd to be used. At this point I'm looking at just changing the send commands but don't feel confident in doing so. Wondering spec

SMTPlib and SMTPd Performance Issues

2009-07-21 Thread Casey McGinty
Hi, I just wanted mention a few workarounds I've come up with for the Python SMTP modules in regards to performance. Before I started, I was getting about 15MB/s while sending e-mail from smtplib to smptd over a local connection. (i.e. both client/server running on the same machine). Afte

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Alex Jurkiewicz
Piet van Oostrum wrote: AJ> if __name__ == '__main__': AJ>THREADS = [] AJ>for i in range(CONCURRENCY): AJ>THREADS.append(threading.Thread(target=threadProcessRecipient)) AJ>for thread in THREADS: AJ>thread.run() You should use thread.start(), not thread.run(). W

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Piet van Oostrum
> Alex Jurkiewicz (AJ) wrote: >AJ> def threadProcessRecipient(): [snip] >AJ> if __name__ == '__main__': >AJ>THREADS = [] >AJ>for i in range(CONCURRENCY): >AJ>THREADS.append(threading.Thread(target=threadProcessRecipient)) >AJ>for thread in THREADS: >AJ>thread.run()

Re: [SPAM] Re: Threaded alternatives to smtplib?

2009-05-04 Thread MRAB
ere seems to be only one connection open to our mail server at any one time. In other words, all these threads gain me no speed benefit at all! I seem to be running into the issue where smtplib is not fully thread-safe, as mentioned in this thread: http://mail.python.org/pipermail/python-list/20

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Diez B. Roggisch
Diez B. Roggisch wrote: > Alex Jurkiewicz wrote: > >> Gabriel Genellina wrote: >>> Try logging the start/stop of your threads. It may be that your >>> threads stop before you think. The above code works correctly only if >>> you fill the queue before starting any thread - because as soon as a >>>

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Diez B. Roggisch
Alex Jurkiewicz wrote: > Gabriel Genellina wrote: >> Try logging the start/stop of your threads. It may be that your >> threads stop before you think. The above code works correctly only if >> you fill the queue before starting any thread - because as soon as a >> thread sees the queue empty, it f

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Alex Jurkiewicz
Gabriel Genellina wrote: Try logging the start/stop of your threads. It may be that your threads stop before you think. The above code works correctly only if you fill the queue before starting any thread - because as soon as a thread sees the queue empty, it finishes. You could use the sample

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Gabriel Genellina
En Mon, 04 May 2009 04:19:21 -0300, Alex Jurkiewicz escribió: Diez B. Roggisch wrote: Without more code, it's impossible to tell if there is anything peculiar in your usage of the lib. Maybe you close your connections to fast to see several open? Here's the relevant stuff from my (python2

Re: Threaded alternatives to smtplib?

2009-05-04 Thread Alex Jurkiewicz
Diez B. Roggisch wrote: Without more code, it's impossible to tell if there is anything peculiar in your usage of the lib. Maybe you close your connections to fast to see several open? Here's the relevant stuff from my (python2.6) code: CONCURRENCY = 3 def threadProcessRecipient(): # Eac

Re: Threaded alternatives to smtplib?

2009-05-03 Thread Diez B. Roggisch
nection open to our mail server at any one time. In other words, all these threads gain me no speed benefit at all! I seem to be running into the issue where smtplib is not fully thread-safe, as mentioned in this thread: http://mail.python.org/pipermail/python-list/2007-March/4

Threaded alternatives to smtplib?

2009-05-03 Thread Alex Jurkiewicz
server at any one time. In other words, all these threads gain me no speed benefit at all! I seem to be running into the issue where smtplib is not fully thread-safe, as mentioned in this thread: http://mail.python.org/pipermail/python-list/2007-March/429067.html http://mail.python.org/piperm

Re: smtplib send email by using gmail smtp server

2009-05-03 Thread tiefeng wu
> > I've tested with 3.0.1 on Windows XP and worked fine. Seems to be a problem > in the SSL support, but that's all I could say. > > -- > Gabriel Genellina > thanks, I'll check SSL support on my system Tiefeng Wu 2009-05-04 -- http://mail.python.org/mailman/listinfo/python-list

Re: smtplib send email by using gmail smtp server

2009-05-03 Thread Gabriel Genellina
En Sun, 03 May 2009 12:18:33 -0300, tiefeng wu escribió: I'm tring send email using smtp.gmail.com here's the code: *s = SMTP('**smtp.gmail.com* *', 25) s.set_debuglevel(1)* *s.ehlo() s.starttls() s.ehlo() s.login(mygmailaccount, mygmailpassword) s.sendmail(from_addr

smtplib send email by using gmail smtp server

2009-05-03 Thread tiefeng wu
Hi all I'm tring send email using smtp.gmail.com here's the code: *s = SMTP('**smtp.gmail.com* *', 25) s.set_debuglevel(1)* *s.ehlo() s.starttls() s.ehlo() s.login(mygmailaccount, mygmailpassword) s.sendmail(from_addr, to_addr_list, message) s.close()* I got the followin

imaplib and smtplib

2009-04-19 Thread Vistro
I want to download a message from my Gmail inbox with imaplib, then forward (basically resend it) with smtplib. I can log in with both. I just need to know how to download a message with imaplib, and what needs to be converted into what to be able to send it with smtplib

Re: smtplib problem with newly rebuilt Debian/lenny system

2009-03-30 Thread cassiope
On Mar 27, 11:29 am, a...@pythoncraft.com (Aahz) wrote: > [posted & e-mailed, please respond to newsgroup] > > In article , > > > > cassiope   wrote: > > >In attempting to diagnose the cause, I tried directly executing the > >lines inside the python2.5 i

Re: smtplib problem with newly rebuilt Debian/lenny system

2009-03-30 Thread BJ Swope
haven't been restored; one of them is a python script which is > used to email users of important events. > > In attempting to diagnose the cause, I tried directly executing the > lines inside the python2.5 interpreter: > >import smtplib >s= smtplib

Re: smtplib problem with newly rebuilt Debian/lenny system

2009-03-27 Thread Aahz
[posted & e-mailed, please respond to newsgroup] In article , cassiope wrote: > >In attempting to diagnose the cause, I tried directly executing the >lines inside the python2.5 interpreter: > >import smtplib >s= smtplib.SMTP('localhost')

smtplib problem with newly rebuilt Debian/lenny system

2009-03-18 Thread cassiope
reter: import smtplib s= smtplib.SMTP('localhost') but the second line causes a traceback: File "", line 1, in File "/usr/lib/python2.5/smtplib.py", line 244, in __init__ (code, msg) = self.connect(host, port) File "

sending gmail with smtplib from behind a proxy

2009-02-26 Thread Bjorn
. Can I adapt this script to work from behind the http or socks proxy? I couldnt understand from the smtplib if I can specify this somehow? Sincerely, bjorn johansson Script- #!/usr/bin/python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import

Re: email varification using smtplib or any method

2009-02-20 Thread Gabriel Genellina
En Fri, 20 Feb 2009 02:58:24 -0200, jitendra gupta escribió: when i am changing msg['To'] = "wrongu...@wrongdomain.comddsdjsdsdsjdh" some wrong email then i am getting back failure notice in my inbox, which i dont want.. is there any way so that i can identify wrong email during the run ti

email varification using smtplib or any method

2009-02-20 Thread jitendra gupta
hello here is my code for sending the mail, using this code email is going '''''''''''''''''''''''''''''''''''''&

Re: Can't load smtplib

2009-02-12 Thread S-boy
Thanks. Turns out I had a script I wrote called email.py in my Python path that was screwing things up. On Feb 12, 2:50 pm, Jean-Paul Calderone wrote: > On Thu, 12 Feb 2009 11:40:57 -0800 (PST), S-boy wrote: > >I can't seem to import smtplib in either a script or the command line

Re: Can't load smtplib

2009-02-12 Thread Jean-Paul Calderone
On Thu, 12 Feb 2009 11:40:57 -0800 (PST), S-boy wrote: I can't seem to import smtplib in either a script or the command line interpreter. When I try to import smtp, there seems to be some kind of collision with urllib2. I get a weird error about Web server authorization, even though I&

Can't load smtplib

2009-02-12 Thread S-boy
I can't seem to import smtplib in either a script or the command line interpreter. When I try to import smtp, there seems to be some kind of collision with urllib2. I get a weird error about Web server authorization, even though I'm not calling urllib2. Any ideas on what might be ca

Re: SMTPlib inside function, extra tab

2008-10-08 Thread Hunter
ess,tolist,msgsubj,messagebody): import smtplib SERVER = "mymailserver.mydomain.com" message = """\ From: %s To: %s Subject: %s %s """ % (fromaddress, ", ".join(tolist),msgsubj, messagebody) pri

Re: SMTPlib inside function, extra tab

2008-10-07 Thread Tino Wildenhain
Hunter wrote: I am writing a script that needs to send some emails. And I've used smtplib in the past and it is pretty easy. But I thought, gee it would be easier if I could just call it as a function, passing the from, to, subject, and message text. So I wrote it up as a function and it

SMTPlib inside function, extra tab

2008-10-07 Thread Hunter
I am writing a script that needs to send some emails. And I've used smtplib in the past and it is pretty easy. But I thought, gee it would be easier if I could just call it as a function, passing the from, to, subject, and message text. So I wrote it up as a function and it sort of works,

Re: how to send a "Multiline" mail with smtplib?

2008-06-23 Thread Evan
On Jun 19, 6:12 pm, Lie <[EMAIL PROTECTED]> wrote: > On Jun 19, 4:02 pm, Justin Ezequiel <[EMAIL PROTECTED]> > wrote: > > > perhaps change html > > > body=MIMEText('hello,\r\n > > ok',_subtype='html',_charset='windows-1255') > > > to plain > > > body=MIMEText('hello,\r\n > > ok',_subtype='plain',_c

Re: how to send a "Multiline" mail with smtplib?

2008-06-19 Thread Lie
On Jun 19, 4:02 pm, Justin Ezequiel <[EMAIL PROTECTED]> wrote: > perhaps change html > > body=MIMEText('hello,\r\n > ok',_subtype='html',_charset='windows-1255') > > to plain > > body=MIMEText('hello,\r\n > ok',_subtype='plain',_charset='windows-1255') If that was the case, and you needed a line b

Re: how to send a "Multiline" mail with smtplib?

2008-06-19 Thread Justin Ezequiel
perhaps change html body=MIMEText('hello,\r\n ok',_subtype='html',_charset='windows-1255') to plain body=MIMEText('hello,\r\n ok',_subtype='plain',_charset='windows-1255') -- http://mail.python.org/mailman/listinfo/python-list

[SMTPLIB] how to send a "Multiline" mail with smtplib?

2008-06-19 Thread Evan
Hello - I'm new with Python, I try to do a mail problem, the code likes below: + import smtplib import mimetypes from email.Encoders import encode_base64 from email.MIMEAudio import MIMEAudio from email.MIMEBase import MIMEBase

Re: smtplib "authentication required" error

2008-05-17 Thread 7stud
]') > > Thanks, > Cher Can you get the following program to work? #Uses gmail to send an email to someone import smtplib sender = "Tom" to = "Sally" subject = "Test smtplib" headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n&qu

smtplib "authentication required" error

2008-05-17 Thread cher
Hey, Don't know if you can help, but I'm trying to import archived messages from Thunderbird into my gmail account and keep getting these types of errors. I am using the GML program to help incorporate, but the SMTP server is not being recognized by gmail. Am I doing something wrong? Anyth

Re: Problem with smtplib and py2exe

2008-04-08 Thread Mike Driscoll
ise, I was able to generate the 'exe' that I needed. > > I guess the incompatibility isn't necessarily between 'py2exe' and > 'smtplib' after all, but between 'py2exe' and 'IDLE'. I also recommend trying out GUI2Exe, a cool GUI wrapper for t

Re: Problem with smtplib and py2exe

2008-04-08 Thread Kevin
t doesn't make sense when you're trying to run another program (in this case, py2exe) with IDLE, then run the program from the command line instead. I did that, and much to my surprise, I was able to generate the 'exe' that I needed. I guess the incompatibility isn't ne

Re: Problem with smtplib and py2exe

2008-04-07 Thread Terry Reedy
#x27;C:\Python25\pythonw.exe' failed with exit | status 1 | | The 'setup.py' script is the same one I used to generate the 'exe' of | the original program. The email-related code was added to my | 'send_file.py' program as a function - it's not a separate mod

Problem with smtplib and py2exe

2008-04-07 Thread Kevin
d with exit status 1 The 'setup.py' script is the same one I used to generate the 'exe' of the original program. The email-related code was added to my 'send_file.py' program as a function - it's not a separate module. If all of the changes are commented out, the

Re: smtplib & gnupg

2008-02-20 Thread Miki
Hello Bernd, > at the moment my program sends mail with smtplib. Is there a chance to > sign and/or encode/cipher this mails with GnuPG? > If yes, does anyone have some sample code? Not exactly Python, but maybe http://codesorcery.net/old/mutt/mutt-gnupg-howto might help. HTH, -- Mik

Re: smtplib & gnupg

2008-02-20 Thread Shane Geiger
assertion because the encryption takes place before the message is sent--that is, before the headers are completely formed. Brot wrote: > Hello, > > at the moment my program sends mail with smtplib. Is there a chance to > sign and/or encode/cipher this mails with GnuPG? > If yes, d

smtplib & gnupg

2008-02-20 Thread Brot
Hello, at the moment my program sends mail with smtplib. Is there a chance to sign and/or encode/cipher this mails with GnuPG? If yes, does anyone have some sample code? Regards Bernd -- http://mail.python.org/mailman/listinfo/python-list

Re: [HELP] SMTPlib not sending my mail

2008-01-29 Thread ashok raavi
postfix/master.cf it started working. Thank you. On 1/29/08, Lars Johansen <[EMAIL PROTECTED]> wrote: > > have you checked your mail server logs ? > > tir, 29.01.2008 kl. 00.24 -0800, skrev ashok.raavi: > > Hi, > > > > I am also facing the same problem, s

Re: [HELP] SMTPlib not sending my mail

2008-01-29 Thread Lars Johansen
have you checked your mail server logs ? tir, 29.01.2008 kl. 00.24 -0800, skrev ashok.raavi: > Hi, > > I am also facing the same problem, smtplib used to send mail a while > back but it stopped sending mails. > > when i run this in interpreter > >>> import

Re: [HELP] SMTPlib not sending my mail

2008-01-29 Thread ashok.raavi
Hi, I am also facing the same problem, smtplib used to send mail a while back but it stopped sending mails. when i run this in interpreter >>> import smtplib >>> s = smtplib.SMTP("localhost") >>> s.sendmail(from, to, "message") {} >>> t

[HELP] SMTPlib not sending my mail

2008-01-21 Thread ornto
Hi, I'm trying to create an application which checks a dynamic web site and on certain events sends an email to me. My problem though is with the email task. By now I made this simple test code: #prova invio email smtpserver = smtplib.SMTP(mailserver) messaggio= "Messaggio di prova" print mai

Re: smtplib problem, Unable to relay for

2007-12-26 Thread Benedict Verheyen
Benedict Verheyen schreef: > Thanks for the responses. I solved it by adjusting the relayers list (i'm a domain admin) in others words i granted my pc the rights to relay. I did this by starting the Exchange System Manager and then going to Servers->->protocols->SMTP Then right click on "Defa

Re: smtplib problem, Unable to relay for

2007-12-22 Thread Grant Edwards
On 2007-12-21, Benedict Verheyen <[EMAIL PROTECTED]> wrote: > i get an "Unable to relay for" when trying to send an email > from within my network to an email address not on my domain. I > don't understand why it says "relaying" as i'm sending from an > internal domain user to an external user. Y

  1   2   3   >