@@ -214,6 +214,9 @@ function onAfterInsert() {
214214 // send a welcome email to create the mailbox
215215// mail($this->dataRecord["email"],$app->tform->wordbook["welcome_mail_subject"],$app->tform->wordbook["welcome_mail_message"]);
216216
217+ /*
218+ // the conversion to iso-8859-1 causes compatibility problems, therefore the transition to utf-8
219+
217220 // tries to detect current charset, and encode subject-header and body from it to ISO-8859-1.
218221 $fromCharset = mb_detect_encoding($app->tform->lng("welcome_mail_subject"));
219222 $iconvPreferences = array("input-charset" => $fromCharset,
@@ -235,6 +238,22 @@ function onAfterInsert() {
235238
236239 mail($mailTarget, $mailSubject, $mailBody, $mailHeaders);
237240
241+ */
242+
243+ $ welcomeFromName = $ app ->tform ->lng ("welcome_mail_fromname_txt " );
244+ $ welcomeFromEmail = $ app ->tform ->lng ("welcome_mail_fromemail_txt " );
245+ $ mailHeaders = "MIME-Version: 1.0 " . "\n" ;
246+ $ mailHeaders .= "Content-type: text/plain; charset=utf-8 " . "\n" ;
247+ $ mailHeaders .= "Content-Transfer-Encoding: 8bit " . "\n" ;
248+ $ mailHeaders .= "From: $ welcomeFromName < $ welcomeFromEmail> " . "\n" ;
249+ $ mailHeaders .= "Reply-To: < $ welcomeFromEmail> " . "\n" ;
250+ $ mailTarget = $ this ->dataRecord ["email " ];
251+
252+ $ mailSubject = "=?utf-8?Q? " . imap_8bit ($ app ->tform ->lng ("welcome_mail_subject " )) . "?= " ;
253+ $ mailBody = $ app ->tform ->lng ("welcome_mail_message " );
254+
255+ mail ($ mailTarget , $ mailSubject , $ mailBody , $ mailHeaders );
256+
238257 // Spamfilter policy
239258 $ policy_id = intval ($ this ->dataRecord ["policy " ]);
240259 if ($ policy_id > 0 ) {
0 commit comments