I have a job that sends email to an organizational box. I have a script that runs as a user that has Full Control of that org box's associated account in an Active Directory 2003 domain.
The script runs on a Windows 2003 server that does not, and will not, have Outlook installed.
Authen::NTLM does not seem to be willing to use the current user's credentials. Any ideas for how to read this mail into the script without installing a client?
UPDATE:
I am also using Email::Folder::Exchange, which is what is complaining about not having credentials available. Snippet below:
#!/c/perl/bin/perl
use strict;
use warnings;
use Email::Folder::Exchange;
use Authen::NTLM;
my $user = ntlm_user();
my $password = ntlm_password();
my $folder = Email::Folder::Exchange->new('https://fqdn.com/Exchange/o
+rgbox/Inbox', $user, $password);
my $pile;
for my $message ($folder->messages) {
if ($message->header('Subject') =~ /Addition to EPAS Training Sit
+e for 18 FLTS/) {
$pile .= $message->body;
last;
}
}
print $pile;
exit;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.