Topic
2 replies Latest Post - ‏2012-12-19T15:30:07Z by haberfv
haberfv
haberfv
7 Posts
ACCEPTED ANSWER

Pinned topic Cannot get

‏2012-12-19T09:36:59Z |
These standalone scripts works:
use CQPerlExt; # for ClearQuest API access
use Mail::Mailer; # used for email
my $MAILHOST = "sadbsmtp.sfa.se";
my $mailer = Mail::Mailer->new('smtp', Server => $MAILHOST);
my $ToList = ('hans.bergstedt@forsakringskassan.se');

$mailer->open({From => 'clearquest@forsakringskassan.se',
To => $ToList,
Subject => 'Production Changes Last Week'
});
print $mailer "Test\n";
$mailer->close();

This prints correctly:
use CQPerlExt;

my $cqmail = CQMailMsg::Build();
my $emailsettings = $cqmail->GetMailNotificationSettings();
foreach $elem (@$emailsettings) {
printf $elem. "\n";
}
CQMailMsg::Unbuild($cqmail);

But this doesn't work:
use CQPerlExt;
my $mailmsg = CQMailMsg::Build();
$till = 'hans.bergstedt@forsakringskassan.se';
$mailmsg->AddTo($till);
$mailmsg->SetSubject("Howdy");
$mailmsg->SetBody("This message brought to you from cqperl!\n");
$mailmsg->Deliver();
CQMailMsg::Unbuild($mailmsg);

Why?

sincerely
Hans
Updated on 2012-12-19T15:30:07Z at 2012-12-19T15:30:07Z by haberfv