Mail-Outlook
view release on metacpan or search on metacpan
lib/Mail/Outlook.pm view on Meta::CPAN
=head2 all_accounts
Return a list of the available accounts. Each element is a hash ref with two
keys: address and account. "address" is the SMPT address, "account" is the Account
object.
=cut
sub all_accounts {
my $self = shift;
my $session = $self->{namespace}->Session || return;
my $accounts = $session->Accounts || return;
my @smtp_addresses = ();
for ( my $i=1;$i<=$accounts->{Count};$i++ ) {
my $item = $accounts->Item($i);
push( @smtp_addresses, { address => $item->smtpAddress, account => $item } );
}
return @smtp_addresses;
}
=head2 create(%hash)
Creates a new message. Option hash table can be used. Returns the new message
object or undef on failure.
=cut
sub create {
my ($self,%hash) = @_;
my $msg = Mail::Outlook::Message->new($self->{outlook}) or return undef;
$msg->create(%hash);
return $msg;
}
1;
__END__
#----------------------------------------------------------------------------
#=head1 FURTHER READING
#If you intend to supply a patch for a bug or new feature, please visit the
#following URL (and associated pages) to ensure you are using the correct
#objects and methods.
#http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/html/olobjApplication.asp
#This article contains some interesting background into creating mail
#messages via Outlook, although it is VB-centric.
#http://www.exchangeadmin.com/Articles/Index.cfm?ArticleID=4657
#=head1 FUTURE ENHANCEMENTS
#A couple of items that I'd like to get working.
#* X-Header support
#* Send without the popups (Outlook Redemption looks possible)
=head1 NOTES
This module is intended to be used on Win32 platforms only, with Microsoft (R)
Outlook (R) installed.
Microsoft and Outlook are registered trademarks and the copyright 1995-2003
of Microsoft Corporation.
=head1 SEE ALSO
Win32::OLE
Win32::OLE::Const
=head1 BUGS, PATCHES & FIXES
There are some minor items under "Issues" , but there are no known serious bugs
at the time of this release.
However, if you spot a
bug or are experiencing difficulties that are not explained within the POD
documentation, please submit a bug to the RT system (see link below). However,
it would help greatly if you are able to pinpoint problems or even supply a
patch.
Fixes are dependent upon their severity and my availability. Should a fix not
be forthcoming, please feel free to (politely) remind me by sending an email
to barbie@cpan.org .
RT: L<http://rt.cpan.org/Public/Dist/Display.html?Name=Mail-Outlook>
=head1 AUTHOR
Barbie, <barbie@cpan.org>
for Miss Barbell Productions, <http://www.missbarbell.co.uk>
=head1 COPYRIGHT AND LICENSE
Copyright E<copy> 2003-2013 Barbie for Miss Barbell Productions.
Copyright E<copy> 2014-2016 Duncan Garland.
This distribution is free software; you can redistribute it and/or
modify it under the Artistic License v2.
=cut
( run in 1.359 second using v1.01-cache-2.11-cpan-364913b4093 )