Skip to content
Snippets Groups Projects
Commit 01dd596e authored by Anton Bagliy's avatar Anton Bagliy
Browse files

Merge branch 'issue590_issue_subject' into develop

parents f314fcdd 7f371a68
Branches
No related merge requests found
......@@ -51,7 +51,7 @@ class Controller_Handler_RequestsProcessing extends Controller_Handler {
));
} else {
$subject = "Request {$ticket}: rating system report";
$subject = "Request {$ticket}: {$title}";
$message = Twig::factory('handler/report', [
'Title' => $title,
......@@ -60,7 +60,8 @@ class Controller_Handler_RequestsProcessing extends Controller_Handler {
])->render();
$replyToName = $this->user->LastName . ' ' . $this->user->FirstName . ' (' . $this->user->FacultyName . ')';
SendMail::send($subject, $message, $to, $to, $this->user->EMail, $replyToName, $hasImage, $ticket);
$replyToNameShort = $this->user->LastName . ' ' . $this->user->FirstName;
SendMail::send($subject, $message, $to, $to, $this->user->EMail, $replyToNameShort, $replyToName, $hasImage, $ticket);
}
$data['success'] = ($ticket > 0);
......
......@@ -13,7 +13,7 @@ class SendMail {
*/
public static function send($subject, $body
, $sendToEmail, $sendToName
, $replyToEmail = null, $replayToName = null, $hasImage = false, $imgFileName = null) {
, $replyToEmail = null, $replyToNameShort = null, $replayToName = null, $hasImage = false, $imgFileName = null) {
$config = Kohana::$config->load('email.default');
$mail = new PHPMailer;
......@@ -31,7 +31,8 @@ class SendMail {
$mail->Port = $config['port'];
$mail->From = $config['from'];
$mail->FromName = $config['fromName'];
//$mail->FromName = $config['fromName'];
$mail->FromName = $replyToNameShort;
$mail->addAddress($sendToEmail, $sendToName); // Add a recipient
$mail->addCC($replyToEmail, $replayToName);
//$mail->addAddress('ellen@example.com'); // Name is optional
......
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