blog->name). '', 'Content-Type: text/HTML; charset=UTF-8;'. 'X-Originating-IP: '.http::realIP(), 'X-Mailer: Dotclear', 'X-Blog-Id: '.mail::B64Header($core->blog->id), 'X-Blog-Name: '.mail::B64Header($core->blog->name), 'X-Blog-Url: '.mail::B64Header($core->blog->url) ); $active_headers = empty($_POST['active_headers']) ? false : true; $mail_to = $_POST['mail_to'] ? $_POST['mail_to'] : ''; $mail_subject = !empty($_POST['mail_subject']) ? $_POST['mail_subject'] : ''; $mail_content = !empty($_POST['mail_content']) ? $_POST['mail_content'] : ''; $mail_to_send = (!empty($_POST['mail_content'])) || (!empty($_POST['mail_to'])) ? true : false; $mail_sent = false; if ($mail_to_send) { try { if (!text::isEmail($mail_to)) { throw new Exception(__('You must provide a valid email address.')); } if ($mail_content == '') { throw new Exception(__('You must provide a content.')); } $mail_subject = mail::B64Header($mail_subject); if ($active_headers) { mail::sendMail($mail_to,$mail_subject,$mail_content,$headers); } else { mail::sendMail($mail_to,$mail_subject,$mail_content); } $mail_sent = true; //http::redirect($p_url); } catch (Exception $e) { $core->error->add($e->getMessage()); } } ?> <?php echo __('Mail testor'); ?> '.__('Mail testor').''; if ($mail_sent) { echo '

'.__('The following mail was sent:').'

'.$mail_subject.'

' .mailConvert::toHTML($mail_content). '
'; } echo '

'. '

'. form::textarea('mail_content',30,7,html::escapeHTML($mail_content),'maximal'). '

'. form::checkbox('active_headers', 1, $active_headers). '

'.form::hidden(array('p'),'testMail'). $core->formNonce(). '

'; ?>