+ $new_text .= "?=";
+
+ $main::lxdebug->leave_sub();
+
+ return $new_text;
+}
+
+sub send {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ local (*IN, *OUT);
+
+ $num_sent++;
+ my $boundary = time() . "-$$-${num_sent}";
+ $boundary = "LxOffice-$self->{version}-$boundary";
+ my $domain = $self->{from};
+ $domain =~ s/(.*?\@|>)//g;
+ my $msgid = "$boundary\@$domain";
+
+ my $form = $main::form;
+ my $myconfig = \%main::myconfig;
+
+ my $email = $myconfig->{email};
+ $email =~ s/[^\w\.\-\+=@]//ig;
+
+ $form->{myconfig_email} = $email;
+
+ my $template = PlainTextTemplate->new(undef, $form, $myconfig);
+ my $sendmail = $template->parse_block($main::sendmail);
+
+ $self->{charset} = Common::DEFAULT_CHARSET unless $self->{charset};
+
+ if (!open(OUT, $sendmail)) {
+ $main::lxdebug->leave_sub();
+ return "$sendmail : $!";
+ }
+