Have an idea?

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

Send Email via survey

Hi,

I try to send an Email at the end of the survey. When the participant finished to fill the survey, an email is sended to me.

It's possible to program this ?
I use the function Send Email in the library and Lighthouse 9.10.0, I put this code in my footer :

[% Begin Unverified Perl

use Net::SMTP::SSL;

# Parameters
my $to = 'xxx@xx.org';
my $subject = 'Test';
my $body = 'Mail test';
my $authUser = 'xxx@xx.org';
my $authPass = 'xxx';

my $smtp = Net::SMTP::SSL->new('mail.xxx.org', 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 1;
}

End Unverified %]

But I have a Sawtooth Error # 132.

I try to remove the word "SSL" (like a post in the forum), I have this error :
Can't locate Net/SMTP/SSL.pm in @INC (you may need to install the Net::SMTP::SSL module).

I have to install something ? But it will be good on the computer of the participant ?

Could you help me please ?

Thank you.
asked Mar 23 by Virginie

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...