473,804 Members | 3,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2609
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@YOU R_DOMAIN.com>"
t = u

msg = MIMEText("""MES SAGE BODY OF EMAIL""")

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

h = "YOUR.SMTP.SERV ER"
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.blogs pot.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***@holdenwe b.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***@holdenwe b.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***@holdenwe b.com>
declaimed the following in comp.lang.pytho n:
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
4632
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 Messages (Y, AOL, MSN, Trillian, etc.) or SMS from within a script? Please copy your reply off group to "access (a) NatPresCh .org" - hopefully I will see your message there sooner. And thanks for any ideas. ~Ray
2
11164
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
467
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 service consumer who will take action on it. Is it possible? If yes, how to implement? If possible, please provide me the link. Thanks lot.
5
3911
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
5927
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 supplier. upto last week it was sending well. Now its returning bounce mail. in the c:\inetpub\mailroot\badmail contains the file(.bdr). The contents of
1
2254
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
6205
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 using which sends If you want to see the above code in its full context you can see it here: http://www.thescripts.com/forum/thread581521.html Willakawill helped me out a bit with getting access to remember if it had already added the...
9
77445
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
1502
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 does not send. I do not get an error, but nothing gets sent. The code is pasted below, any and all help is greatly appreciated. I have changed the "to" address and the password for "no spam" reasons. :)
3
8189
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 fine, but I need to set and send a cookie with the WebRequest. How do I do that?
0
9575
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10564
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10308
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.