472,371 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to get the recipients addresses of an outlook mail in python...

Hi all,
Can some one help me in obtaining the set of recipients email
addresses from an outlook mail? I tried various options like

message.Recipient.Address
message.To.Address
message.Receiver.Address etc.. but I could get the senders address
using message.Sender.Address.
Thanks in advance,
Venu.
Oct 16 '08 #1
4 4048
* * * * Can some one help me in obtaining the set of recipients email
addresses from an outlook mail? I tried various options like ...
message["To"]
message["Cc"]

HTH,
--
Miki
http://pythonwise.blogspot.com
Oct 16 '08 #2
On Oct 16, 5:22*pm, Miki <miki.teb...@gmail.comwrote:
* * * * Can some one help me in obtaining the set of recipientsemail
addresses from an outlook mail? I tried various options like ...

message["To"]
message["Cc"]

HTH,
--
Mikihttp://pythonwise.blogspot.com
Thanks for your reply... Sorry , it didn't work...
session = Dispatch("MAPI.session")
session.Logon('outlook') # MAPI profile name
inbox = session.Inbox
message = inbox.Messages.Item(i + 1)
rec = message["To"]
print rec

I did some thing like the above code...it said the below error...
raise TypeError, "This object does not support enumeration"
TypeError: This object does not support enumeration
Thank you,
Venu.
Oct 16 '08 #3
ve***********@gmail.com wrote:
On Oct 16, 5:22 pm, Miki <miki.teb...@gmail.comwrote:
>> Can some one help me in obtaining the set of recipients email
addresses from an outlook mail? I tried various options like ...
message["To"]
message["Cc"]

HTH,
--
Mikihttp://pythonwise.blogspot.com

Thanks for your reply... Sorry , it didn't work...
session = Dispatch("MAPI.session")
session.Logon('outlook') # MAPI profile name
inbox = session.Inbox
message = inbox.Messages.Item(i + 1)
rec = message["To"]
print rec

I did some thing like the above code...it said the below error...
raise TypeError, "This object does not support enumeration"
TypeError: This object does not support enumeration
This report is impossibly vague. If you really need help then please
take the trouble to provide *exactly* the code you used (pasting from
the actual program) and the full traceback. Otherwise we don't even know
which statement is going wrong, let alone how.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Oct 17 '08 #4
ve***********@gmail.com wrote:
On Oct 16, 5:22 pm, Miki <miki.teb...@gmail.comwrote:
>> Can some one help me in obtaining the set of recipients email
addresses from an outlook mail? I tried various options like ...
message["To"]
message["Cc"]

HTH,
--
Mikihttp://pythonwise.blogspot.com

Thanks for your reply... Sorry , it didn't work...
session = Dispatch("MAPI.session")
session.Logon('outlook') # MAPI profile name
inbox = session.Inbox
message = inbox.Messages.Item(i + 1)
rec = message["To"]
print rec

I did some thing like the above code...it said the below error...
raise TypeError, "This object does not support enumeration"
TypeError: This object does not support enumeration
This report is impossibly vague. If you really need help then please
take the trouble to provide *exactly* the code you used (pasting from
the actual program) and the full traceback. Otherwise we don't even know
which statement is going wrong, let alone how.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Oct 17 '08 #5

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

Similar topics

2
by: Alex Hunsley | last post by:
I'm using the smtp module to send emails from python. I would like to specify several recipients of the email like follows: msg = MIMEText(time.ctime("Body text of email") me =...
8
by: dccarson | last post by:
Here is a snippet of code which does not send to all recipients. However, it also does not inform me of this error. My suspicion is that this only fails for users with longer usernames. The two I...
15
by: news.microsoft.com | last post by:
HI, ASPEmail to send to multiple recipients? I tried to use comma and semicolon but all the time give this message error: Error: 6 - 501 Bad address syntax nor :...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
2
by: .Net Newbie | last post by:
Hello, I am currently coding my ASP.Net pages in c# and have run into a question concerning Emails. I have four objects on a page (six including 2 buttons). The first is a subject line...
4
by: Michelle | last post by:
Hi Is it possible/anyone know how to send a document (.pdf) to multiple recipients using POP where the email is not just a matter of throwing 1000 email addresses in the BCC list, but each email...
2
by: mik.sjoblom | last post by:
Hello, I have developed a Access application that needs to read mail from Outlook, versions on Access and outlook are 2003. In the code i use mapi to connect to outlook. When i tries to read the...
1
by: sxwend | last post by:
I am trying to use the following post results (http://www.thescripts.com/forum/thread189759.html) and add another requirement. I need to send the results to just the email addresses that the query...
1
by: Sergeles | last post by:
I am currently in the process of making/maintaining a database for a school club. I started the database mostly from scratch and i have a pretty good familiarity with Access (been using it for almost...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.