ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
Re: Getting MIME::Lite working on Windows
by Bill Luebkert other posts by this author
Apr 28 2008 5:21AM messages near this date
RE: Getting MIME::Lite working on Windows | RE: Getting Mime::Lite working on Windows
Curtis Leach wrote:
>  Thanks to everyone who responded.
>  
>  I ended up having to put the SMTP server name to use into a config file.
>  Since I couldn't figure out a way to ask Windows/Outlook in Perl what it
>  was configured to use.

Try something like:

use strict;
use warnings;
use Win32::OLE::Const 'Microsoft Outlook';

my $OL = Win32::OLE-> GetActiveObject('Outlook.Application') or
   Win32::OLE-> new('Outlook.Application', 'Quit');
die 'GetActiveObject ->  new failed' if not $OL; # try opening OE if you err here

my $NameSpace = $OL-> GetNameSpace("MAPI");
my $EmailAddr = $NameSpace-> {CurrentUser}{Address};
print "Email=$EmailAddr\n";

__END__
_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Curtis Leach
Octavian Rasnita
Curtis Leach
Bill Luebkert
Paula J Capacio

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved