Skip to content
Snippets Groups Projects
Commit c917ce2c authored by PavelBegunkov's avatar PavelBegunkov
Browse files

mail

parent f7d315f1
Branches
No related merge requests found
......@@ -28,11 +28,21 @@ class Controller_Handler_ErrMessages extends Controller_Handler {
$text = $_POST['text'];
$result = $this->model->newRequest($this->user['AccID'], $title, $text);
if ($result[0]['Num'] > 0) {
$to = "it.lab.mmcs@gmail.com";
$headers = "Reply-To: ".$this->user['AccEMail'];
$title = "Request ".$result[0]['Num'].": ".$title;
$subject = "Request ".$result[0]['Num'].": rating system report";
$message = "Faculty: ".$this->user['FacultyName']."\n";
$message .= "Type: ".$this->user['AccType']."\n";
$message .= "Sender: ".$this->user['Last'].' '.$this->user['First'].' '.$this->user['Second']."\n";
$message .= "Title: ".$title."\n";
$message .= "Message: ".$text;
$headers = "From: no-reply@rating.mmcs.sfedu.ru\n";
$headers .= "Reply-To: ".$this->user['AccEMail'];
echo Debug::vars($message, $headers, $title);
$data['success'] = true;
mail($to, $title, $text, $headers);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment