Skip to content

Commit

Permalink
Add encoding of Russian letters in the mail headers
Browse files Browse the repository at this point in the history
  • Loading branch information
itchief committed Jul 25, 2017
1 parent e79727f commit 5d002bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions feedback/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<head>
<meta charset="utf-8">
<title>Форма обратной связи</title>
<link rel="stylesheet" href="vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="vendors/jgrowl/jquery.jgrowl.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="/feedback/vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/feedback/vendors/jgrowl/jquery.jgrowl.min.css">
<link rel="stylesheet" href="/feedback/css/main.css">
</head>

<body>
Expand Down
5 changes: 3 additions & 2 deletions feedback/process/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ function checkTextLength($text, $minLength, $maxLength)
$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
$mail->IsHTML(true); // формат HTML
$mail->setFrom(MAIL_FROM, MAIL_FROM_NAME);
$mail->Subject = MAIL_SUBJECT;
$fromName = '=?UTF-8?B?'.base64_encode(MAIL_FROM_NAME).'?=';
$mail->setFrom(MAIL_FROM, $fromName);
$mail->Subject = '=?UTF-8?B?'.base64_encode(MAIL_SUBJECT).'?=';
$mail->Body = $bodyMail;
$mail->addAddress(MAIL_ADDRESS);

Expand Down

0 comments on commit 5d002bf

Please sign in to comment.