Advertisement

06.04.2008 at 07:31AM PDT, ID: 23456807
[x]
Attachment Details

Perl - Problem Sending email to Outlook Mail Folder

Asked by GarlicHamster in Perl Programming Language, Outlook Groupware Software

Tags: Perl

We have a Perl script that successfully sends emails to various distribution lists etc. However, we are now trying to send to an address that resolves as an Outlook email folder, with no success.
No error message is received - the email just doesn't arrive.

We have had the configuration of the folder checked, and have been told there are no issues.

Since we know our code sends emails, we're assuming there is some other factor we haven't considered.

I've included the relevant code snippets. Any ideas gratefully received!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
Code to gather email address:
 
elsif($_->[3] =~ /^*ABCDE*/) {
      ## Populate the centre name
      $centreName = "ABCDE";
      ## E-mail To: field
      $to = "ABC-SupportCenter\@mycompany.com";
      ## E-mail body text
      $message = &getMessage($centreName, @{$_});
}
Code to generate email:
 
sub sendMail
{
            my ($from, $to, $subject, $message) = @_;
            my $mailserver = $UtilHandler->get_iw_config("iwsend_mail", "mailserver");
            my $mailer     = new Mail::Mailer('smtp', Server => $mailserver);
            my(%headers) = ('To'           => $to,
                                    'From'         => $from,
                                    'Subject'      => $subject,
                                    'Mime-Version' => "1.0",
                                    'Content-Type' => 'text/html; charset=UTF-8',
                                    );
            if ($LOGPATH) {
                        $UtilHandler->log($LOGPATH, "[To]: $to", 1);
                        $UtilHandler->log($LOGPATH, "[From]: $from");
                        $UtilHandler->log($LOGPATH, "[Subject]: $subject");
                        $UtilHandler->log($LOGPATH, $message);
                        $UtilHandler->log($LOGPATH, "======================================================");
            }
            eval('$mailer->open(\%headers); print $mailer $message; $mailer->close;');
}
 
Loading Advertisement...
 
[+][-]06.04.2008 at 07:52AM PDT, ID: 21710711

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.04.2008 at 08:37AM PDT, ID: 21711177

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Outlook Groupware Software
Tags: Perl
Sign Up Now!
Solution Provided By: GarlicHamster
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628