473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Send email notification

Is there a special module for mail ?

I'd like to send an email [to 'n' unique email addresses] from a python
script.

Thanks !

Mar 7 '06 #1
9 2590
Ernesto wrote:
Is there a special module for mail ?

I'd like to send an email [to 'n' unique email addresses] from a python
script.

http://www.justfuckinggoogleit.com/s...pl?python+smtp

Mar 7 '06 #2
I guess that was jerk-off version of:

"smtplib"

Thanks a lot.

Mar 7 '06 #3
Ernesto wrote:
Is there a special module for mail ?

I'd like to send an email [to 'n' unique email addresses] from a python
script.

Thanks !

This class makes what you want to do extremely easy.

http://motion.sourceforge.net/related/send_jpg.py

-Larry Bates
Mar 7 '06 #4
Ernesto wrote:
Is there a special module for mail ?

I'd like to send an email [to 'n' unique email addresses] from a python
script.


from email.MIMEText import MIMEText
import email.Utils
import smtplib

# 'users' is a list of email addys.
for u in users:
try:
print "Sending email to ... ", u
f = "FROM_NAME<FROM_EMAIL_ADDY@YOUR_DOMAIN.com>"
t = u

msg = MIMEText("""MESSAGE BODY OF EMAIL""")

msg["Subject"] = "MESSAGE SUBJECT"
msg["Message-id"] = email.Utils.make_msgid()
msg["From"] = f
msg["To"] = t

h = "YOUR.SMTP.SERVER"
s = smtplib.SMTP(h)
s.sendmail(f, t, msg.as_string())
s.quit()
except Exception, e:
print e
Mar 7 '06 #5
Ernesto wrote:
I guess that was jerk-off version of:

"smtplib"

Thanks a lot.

Well, it gave you the information you wanted, right? (Except that it
might have mentioned the "email" package, which would help you
formulating the messages as well.

But that which doesn't kill us makes us stronger, and at least you
aren't dead :-)

Hang around here long and you'll see a bunch of people waiting on
replies to questions Google could have given them far quicker. If we
weren't paid thousands of dollars a week to answer questions on this
list we'd probably get snarky more often.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Love me, love my blog holdenweb.blogspot.com

Mar 8 '06 #6
Ernesto a écrit :
Is there a special module for mail ?

I'd like to send an email [to 'n' unique email addresses] from a python
script.


If you want all adressee to be the only one visible in to: field, you
must send n emails.

For such a purpose, see iMailer module here:

http://nojhan.free.fr/article.php3?id_article=22

Else, see other posts.

A+

Laurent.
Mar 8 '06 #7
On 2006-03-08, Steve Holden <st***@holdenweb.com> wrote:
Hang around here long and you'll see a bunch of people waiting
on replies to questions Google could have given them far
quicker. If we weren't paid thousands of dollars a week to
answer questions on this list we'd probably get snarky more
often.


That reminds me: I haven't seen last weeks check yet. I trust
it will arrive soon...

--
Grant Edwards grante Yow! I feel like I am
at sharing a "CORN-DOG" with
visi.com NIKITA KHRUSCHEV...
Mar 8 '06 #8
On Wed, 08 Mar 2006 06:20:42 +0000, rumours say that Steve Holden
<st***@holdenweb.com> might have written:
If we
weren't paid thousands of dollars a week to answer questions on this
list we'd probably get snarky more often.


Steve, please, don't make me look like a liar in front of the children!
--
TZOTZIOY, I speak England very best.
"Dear Paul,
please stop spamming us."
The Corinthians
Mar 8 '06 #9
Dennis Lee Bieber wrote:
On Wed, 08 Mar 2006 06:20:42 +0000, Steve Holden <st***@holdenweb.com>
declaimed the following in comp.lang.python:
Hang around here long and you'll see a bunch of people waiting on
replies to questions Google could have given them far quicker. If we
weren't paid thousands of dollars a week to answer questions on this
list we'd probably get snarky more often.


What! Why didn't anyone tell me where to submit my timecard?


It's by the *byte*, Dennis. How did you think Alex managed all that
time off real work to write a book on Python (like anyone buys those)?

;-)

-Peter

Mar 9 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ray Paseur | last post by:
We broadcast email messages with PHP scripts, but sometimes email is not timely and we would like to send something that could get there faster. Can anyone tell me about how to send Instant...
2
by: AJ | last post by:
Hi, I wanted to know how can we send out email notification for the Jobs that are completed. Thanks a lot in advance.... AJ
17
by: Michael Fan | last post by:
I am a newbie for web servcie and want to write a web service which monitors the certain field in the database. Once it exceeds the certain value, web service will send out notification to web...
5
by: Abhishek Srivastava | last post by:
Hello All, I wrote the follownig program using System; using System.Web.Mail; public class MailHelper { public static void SendMail(string mailId, string author, string email,
2
by: Rajani | last post by:
Hi friends, I am sending mail from ASP program. My server is win 2k, IIS 5. SMTP server is configured. I am generating a report(purchase order) and the same sending as an email to the...
1
by: logambiga | last post by:
hai everybody, i want to know how to send an email notification from db2. I configured the smtp server also,but im not able to receive mails.please help me how to solve this.
16
by: Kosmos | last post by:
Good afternoon everyone, just wondering if anyone knew if it's possible to send meetings or appointments through email when you run VBA or SQL code in Access 2003? The following is the code I've been...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
7
by: John Straumann | last post by:
Hi all: I am trying to write some code to send an email from an Assembly file, and found some examples on MSDN. However when I run the program (I am using a console app for testing), the email...
3
by: Dave | last post by:
string m_request = some_web_page; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request ); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Which works...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.