register_setting – textarea with line-breaks
-
Hey there,
I’m scripting a plugIn which can submit a specific message to an email address.
The mail text is specified in the back-end in a textarea.The problem I do have is:
In the back-end textarea line-breaks are displayed correctly,
(Simple as line-breaks, not as “
” tags or anything else, just a break)
but in the mail the user receives the breaks are removed.Why is that?
The functions I’m using are:register_setting( 'va_db_form_settings', 'va_db_form_mail_content' );
To register the setting.$mail_text = get_option('va_db_form_mail_content'); $mail_rec = get_option('va_db_form_mail'); $mail_sender = "From: ".get_bloginfo('name')." < ".get_bloginfo('admin_email')." >\n"; $mail_sender .= "Content-Type: text/html\n"; $mail_sender .= "Content-Transfer-Encoding: 8bit\n"; $message = $mail_text; mail($mail_rec, $mail_sub, $message, $mail_sender);To send the mail.
Appreciate your help!
Regards,
Valentin
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘register_setting – textarea with line-breaks’ is closed to new replies.