473,791 Members | 2,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail::Outlook help

1 New Member
I can do the basics but can't find much docs. I need to

A)look in a second mailbox IE not the one Mail::Outlook seems to default to.

b) Date of emails--I'm getting a strange number, not julian, not a date.
Help! or point me to docs!

Thanks
Mar 22 '07 #1
2 3411
miller
1,089 Recognized Expert Top Contributor
Hi James,

The only documentation that I know if is here:

cpan Mail::Outlook

However, note that all distributions generally come with test scripts in the "t" directory, and this package also appears to come with a couple very rudimentary examples.

http://search.cpan.org/src/BARBIE/Mail-Outlook-0.10/


- Miller
Mar 22 '07 #2
lukeyboy1
1 New Member
Try this sample code, that I put together: it searches for the folder called '$FOLDER_SEARCH ' at the top level. This is useful when you have multiple mail boxes. Hope it helps!

Expand|Select|Wrap|Line Numbers
  1. sub getOutlook {
  2.     my $FOLDER_SEARCH = shift;
  3.  
  4.     my $outlook = Win32::OLE->new('Outlook.Application') or die "Unable to load Outlook";
  5.  
  6.     # Get the Inbox folder
  7.     my $namespace = $outlook->GetNamespace("MAPI");
  8.     my $Deleted = $namespace->GetDefaultFolder(3);
  9.  
  10.     my $folder;
  11.     for(my $i=1; $i<=$namespace->Folders->Count; $i++) {
  12.         eval {
  13.             my $folder1 = $namespace->Folders($i);
  14.             if ($folder1) {
  15.                 #print "\nName is ".$folder1->Name;
  16.                 if($folder1->Name =~ /$FOLDER_SEARCH/) {
  17.                     #print "\n MATCH ON $FOLDER_SEARCH";
  18.                     $folder = $folder1;
  19.                 }
  20.             }
  21.         };
  22.         if($@) {
  23.  
  24.         }
  25.     }
  26.  
  27.     #my $folder = $namespace->GetDefaultFolder(olFolderInbox);
  28.     $folder ||= $namespace->GetDefaultFolder(olFolderInbox);
  29.     my $items = $folder->Items;
  30. }
  31.  
May 3 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1746
by: Louis Frolio | last post by:
Greeting All, has anyone had luck getting SQL mail running without Outlook? Will any MAPI email client work? Thanks in advance. Louis
10
2168
by: CReds | last post by:
OK, I am little down right now. We have spent the better part of six months getting our website programmed and tested. We finally went live last week. This week, we get a e-mail from another department stating we must submit reports via a Outlook Template. This is a good thing overall. The website I have, pretty much asks the same questions as they want, but they want us to use the template. Can I incorporate the template using CDO...
3
2266
by: ralphNOSPAM | last post by:
I'm trying to send a Txt Msg to my Verizon cell phone using PHP Mail(). I use a mail gateway that verizon has provided. It works OK - but - the From string I see on my cell phone when I get the txt msg always shows 'From: postmaster@notice.com' instead of what I want: 'From: webmaster@notice.com.' Here is my code below. Does anyone know why the From string is not being detected? I don't know if this is a PHP issue, a notice.com domain...
1
1368
by: Onur Bozkurt | last post by:
I want to send the rendered output of the page while sending e-mail. Is there anyway to do this...?
0
958
by: blini | last post by:
//create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress("felipe.blini@gmail.com"); mail.To.Add("felipe.blini@gmail.com"); //set the content mail.Subject = "This is an email"; mail.Body = "this is the body content of the email.";
2
1515
by: boloi | last post by:
Now, I want to write script PHP for send mail:"after 30 seconds send 10 email".Help me? :) :)
1
6052
by: Vithal | last post by:
How to use Mail::Outlook module?
2
1502
by: Amma | last post by:
Hello Everybody, Myself is Prasanth from india,doing B.tech second year.i am working for one small project.In that,I was looking to work for automated E-mail sender to my public domian mail id's that is any gmail.com or yahoomail.com. Pls do help me on the same at the earliest on any kind of language that will sent the attached mail to concern persons. Thanks in Advance !
2
1918
by: =?Utf-8?B?NWV1cm9wZWFuY3Vwcw==?= | last post by:
just picked up a new laptop and want to use my main email account on this machine + my desktop. I use outlook express on the desktop and wondered whether it was possible to view my main email account + contacts and history on both machines? I have been able to create an account using the same mail address on the laptop, but i'm getting some mails on one machine and some (others) on the other machine...totally confused ...can someone...
0
9512
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
10419
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...
0
10201
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9987
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
9023
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
7531
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
6770
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
5424
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...
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.