<?
## Email File -> send contact form to site admin
## called only from the content_pages.php page!

if ( !defined('INCLUDED') ) { die("Access Denied"); }

$send = true; // always sent;

## text message - editable
$text_message = 'Eine neue Nachricht wurde über das Kontakt Formular versendet.

Benutzer Details:

	- Name: %1$s
	- E-Mail: %2$s
	- Benutzername (optional): %3$s
	
Frage:

%4$s';

## html message - editable
$html_message = 'Eine neue Nachricht wurde über das Kontakt Formular versendet.<br>
<br>
Benutzer Details: <br>
<ul>
	<li>Name: <b>%1$s</b></li>
	<li>E-Mail: <b>%2$s</b></li>
	<li>Benutzername (optional): <b>%3$s</b></li>
</ul>
Frage:<br>
<br>
%4$s';


$text_message = sprintf($text_message, $user_details['name'], $user_details['email'], $user_details['username'], $user_details['question_content']);
$html_message = sprintf($html_message, $user_details['name'], $user_details['email'], $user_details['username'], $user_details['question_content']);

$email_subject = ($topic_id) ? 'Ref. Mitteilung #' . $topic_id . '; Benutzername: ' . $user_details['username'] : $setts['sitename'] . ' - Neue Kontakt-Mitteilung';

send_mail($setts['admin_email'], $email_subject, $text_message, 
	$setts['admin_email'], $html_message, null, $send);
?>