Ivan - Fix PHPMailer configurations, improve user system install [skip ci]

This commit is contained in:
ivan 2017-03-16 16:11:27 -03:00
parent 05f0d453e1
commit 475d11ccac
4 changed files with 9 additions and 7 deletions

View File

@ -56,8 +56,8 @@ class InstallStep4UserSystem extends React.Component {
path: '/system/init-settings',
data: {
'language': this.props.language,
'user-system-enabled': form['user-system-enabled'],
'registration': form['registration']
'user-system-enabled': form['user-system-enabled'] * 1,
'registration': form['registration'] * 1
}
}).then(() => browserHistory.push('/install/step-5'));
}

View File

@ -48,8 +48,8 @@ class InitSettingsController extends Controller {
'max-size' => 1024,
'title' => 'Support Center',
'url' => 'http://dev3.opensupports.com',
'registration' => Controller::request('registration'),
'user-system-enabled' => Controller::request('user-system-enabled'),
'registration' => !!Controller::request('registration'),
'user-system-enabled' => !!Controller::request('user-system-enabled'),
'last-stat-day' => date('YmdHi', strtotime(' -12 day ')),
'ticket-gap' => Hashing::generateRandomPrime(100000, 999999),
'file-gap' => Hashing::generateRandomPrime(100000, 999999),

View File

@ -340,7 +340,7 @@
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding-bottom: 30px;">
Use this code in {{url}}/verify-token or click the button below.
Use this code in {{url}}/verify-token/{{email}}/{{verificationToken}} or click the button below.
</td>
</tr>
<tr>
@ -351,7 +351,7 @@
<tr>
<td class="button">
<div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f">
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="{{url}}/verify-token/{{to}}/{{verificationToken}}" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;">Shop Now</center>
</v:roundrect>

View File

@ -5,6 +5,7 @@ class MailSender {
public function __construct() {
$this->mailOptions['from'] = Setting::getSetting('no-reply-email')->value;
$this->mailOptions['fromName'] = 'OpenSupports';
$this->mailOptions['smtp-host'] = Setting::getSetting('smtp-host')->value;
$this->mailOptions['smtp-port'] = Setting::getSetting('smtp-port')->value;
@ -23,6 +24,7 @@ class MailSender {
$mailer = new PHPMailer();
$mailer->From = $this->mailOptions['from'];
$mailer->FromName = $this->mailOptions['fromName'];
$mailer->addAddress($this->mailOptions['to']);
$mailer->Subject = $this->mailOptions['subject'];
$mailer->Body = $this->mailOptions['body'];