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
# Details for email participant
my $to = GETVALUE("Mail");
my $from = 'firstname.lastname@example.org';
my $subject = 'Subject of the mail';
my $type = "text/html";
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);
End Unverified %]