473,842 Members | 1,372 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 2611
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
4635
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
11167
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
3915
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
5928
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
2255
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
6216
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
77451
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
1503
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
8194
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
10952
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
10683
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
10320
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9459
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
7862
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
7045
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
5699
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...
1
4506
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4096
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.