Dear Sawtooth-Team,
I am about to work on a survey which has the following requirements:
The participant needs to read and agree to certain terms and conditions during the survey.
As soon as the participant agrees, a cofirmation email should be send to his or her account.
Perl sends the Mail, but most of the time it sends the Mail twice.
Can you maybe help me and tell my why this happens?
In case its important, the Mail is send from a Free-format question which is not visible for the participant.
Here is what i scripted:
[% Begin Unverified Perl
#!/usr/bin/perl
use MIME::Lite;
use utf8;
# Details for email participant
my $to = GETVALUE("Mail");
my $from = '[email protected]';
my $subject = 'Subject of the mail';
no utf8;
my $type = "text/html";
# message
my $message = 'This is the message, including html formatting';
#mail to participant
my $msg = MIME::Lite->new(
From=> $from, To=> $to, Subject => $subject, Type=> $type, Data=> $message);
$msg->send;
return "";
End Unverified %]
Best regards!