Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Library->Send Email

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
asked Mar 8 by Chris Guth Bronze (540 points)

1 Answer

0 votes
OK, so I was able to resolve this.  My setup didn't like the line:
use Net::SMTP::SSL;
so I remove the "SSL" portion from:
use Net::SMTP::SSL;
and:
my $smtp = Net::SMTP::SSL->
and I no longer received the Sawtooth Error 132...but...I still didn't receive an email (using my godaddy email server). So I used our in-house email server and voila...I received the email.
answered Mar 8 by Chris Guth Bronze (540 points)
...