473,386 Members | 1,819 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,386 software developers and data experts.

Mail::Outlook help

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 3397
miller
1,089 Expert 1GB
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
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
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
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...
3
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...
1
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
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...
2
by: boloi | last post by:
Now, I want to write script PHP for send mail:"after 30 seconds send 10 email".Help me? :) :)
1
by: Vithal | last post by:
How to use Mail::Outlook module?
2
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.