Has anyone used the Sawtooth Library Question that allows you to send and email from Sawtooth? I've tried inserting the question into my survey but I get a Sawtooth Error 132 at that question when I run the survey. I simply added the question and updated the parameters which is located in the SKIP tab.
Begin Unverified Perl
use Net::SMTP::SSL;
# Parameters
my $to = 'me@mycompany.com';
my $subject = 'Alert';
my $body = 'Concern recorded';
my $authUser = 'me@mycompany.com';
my $authPass = 'xxxxxxx';
my $smtp = Net::SMTP::SSL->new('smtpout.secureserver.net', Port => 25);
if ($smtp) {
$smtp -> auth($authUser, $authPass);
$smtp -> mail($authUser);
if ($smtp -> to ($to)) {
$smtp -> data();
$smtp -> datasend("To: $to\n");
$smtp -> datasend("From: $authUser\n");
$smtp -> datasend("Subject: $subject\n");
$smtp -> datasend("\n");
$smtp -> datasend("$body\n");
$smtp -> dataend();
}
$smtp -> quit;
}
return 0;
End Unverified