mirror of
https://github.com/PGYER/codefever.git
synced 2026-06-04 17:41:36 +08:00
fix(Send Mail): add utf-8 support
This commit is contained in:
@@ -12,7 +12,8 @@ class Mail {
|
||||
);
|
||||
|
||||
$from = YAML_EMAIL_NAME . '<' . YAML_EMAIL_FROM . '>';
|
||||
$result = exec("echo -e '{$body}' | mail -r '{$from}' -s '{$title}' '{$to}'");
|
||||
|
||||
$result = exec("export LANG=en_US.UTF-8 && echo -e '{$body}' | mail -r '{$from}' -s '{$title}' '{$to}' > /dev/null &");
|
||||
|
||||
Logger::Log(
|
||||
'from:' . $from . ' Sent result:' . json_encode($result),
|
||||
|
||||
@@ -79,7 +79,7 @@ jQuery.validator.addMethod("regexTel",
|
||||
, "格式错误"); // addMethod第3个参数:默认错误信息
|
||||
|
||||
var validateMobileCodeTimes = 0;
|
||||
var tickingSecond = 60;
|
||||
var tickingSecond = 120;
|
||||
var key = '<?php echo $key; ?>'
|
||||
var mode = '<?php echo $mode; ?>'
|
||||
|
||||
@@ -212,7 +212,7 @@ function startTicking() {
|
||||
tickingSecond --;
|
||||
} else {
|
||||
$('#btn_get_code').text('<?php echo lang('user_form_get_code_re')?>').removeAttr('disabled').removeClass('color-grey');
|
||||
tickingSecond = 60;
|
||||
tickingSecond = 120;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ swapon /root/swap
|
||||
|
||||
```shell
|
||||
# 安装基础软件包
|
||||
yum install -y sudo tcl tk gettext autoconf gcc cmake3 wget initscripts openssh-server crontabs mailx pcre pcre-devel libcurl libcurl-devel libxml2 libxml2-devel openssl openssl-devel sqlite sqlite-devel libpng libpng-devel libwebp libwebp-devel libjpeg libjpeg-devel libXpm libXpm-devel freetype freetype-devel oniguruma oniguruma-devel libyaml libyaml-devel
|
||||
yum install -y sudo tcl tk gettext autoconf gcc cmake3 wget initscripts openssh-server crontabs mailx sendmail pcre pcre-devel libcurl libcurl-devel libxml2 libxml2-devel openssl openssl-devel sqlite sqlite-devel libpng libpng-devel libwebp libwebp-devel libjpeg libjpeg-devel libXpm libXpm-devel freetype freetype-devel oniguruma oniguruma-devel libyaml libyaml-devel
|
||||
```
|
||||
|
||||
除此之外,你还需要安装 `libzip 1.7+` 库,需要去官网下载源码包解压后安装。
|
||||
@@ -234,6 +234,7 @@ sh ./remove_test_data.sh
|
||||
|
||||
```shell
|
||||
chkconfig mariadb on # 或 chkconfig mysql on (根据安装的数据库类型, 如果使用云服务忽略此项目)
|
||||
chkconfig sendmail on
|
||||
chkconfig nginx on
|
||||
chkconfig php-fpm on
|
||||
chkconfig codefever on
|
||||
|
||||
@@ -106,7 +106,7 @@ class UserSettingEmail extends React.Component {
|
||||
validationEmail: null,
|
||||
code: '',
|
||||
codeDisabled: false,
|
||||
count: 61
|
||||
count: 121
|
||||
}
|
||||
|
||||
const { intl } = props
|
||||
@@ -244,7 +244,7 @@ class UserSettingEmail extends React.Component {
|
||||
this.setState({ codeDisabled: true, count: --count })
|
||||
window.setTimeout(() => this.countDown(), 1000)
|
||||
} else {
|
||||
this.setState({ codeDisabled: false, count: 61 })
|
||||
this.setState({ codeDisabled: false, count: 121 })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user