Skip to content

Commit

Permalink
add emailfrom
Browse files Browse the repository at this point in the history
  • Loading branch information
skywalker512 committed Jun 30, 2018
1 parent 882a7b1 commit a6adfe2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/languages/Chinese/definitions.SMTP.php
Expand Up @@ -2,6 +2,7 @@
$definitions["Server"] = "服务器";
$definitions["Port"] = "端口";
$definitions["Authentication"] = "验证";
$definitions["From"] = "发信人";
$definitions["Normal"] = "正常";
$definitions["TLS"] = "TLS";
$definitions["SSL"] = "SSL";
3 changes: 3 additions & 0 deletions addons/plugins/SMTP/plugin.php
Expand Up @@ -27,6 +27,7 @@ function handler_sendEmailBefore($mail, &$to, &$subject, &$body)
$mail->Port = C("plugin.SMTP.port");
$mail->Username = C("plugin.SMTP.username");
$mail->Password = C("plugin.SMTP.password");
$mail->From = C("esoTalk.emailFrom");
}

/**
Expand All @@ -46,6 +47,7 @@ public function settings($sender)
$form->setValue("password", C("plugin.SMTP.password"));
$form->setValue("port", C("plugin.SMTP.port"));
$form->setValue("auth", C("plugin.SMTP.auth"));
$form->setValue("from", C("esoTalk.emailFrom"));

// If the form was submitted...
if ($form->validPostBack("smtpSave")) {
Expand All @@ -57,6 +59,7 @@ public function settings($sender)
$config["plugin.SMTP.password"] = $form->getValue("password");
$config["plugin.SMTP.port"] = $form->getValue("port");
$config["plugin.SMTP.auth"] = $form->getValue("auth");
$config["esoTalk.emailFrom"] = $form->getValue("from");

if (!$form->errorCount()) {

Expand Down
5 changes: 5 additions & 0 deletions addons/plugins/SMTP/views/settings.php
Expand Up @@ -39,6 +39,11 @@
<?php echo $form->input("port", "text"); ?>
</li>

<li>
<label><?php echo T("From"); ?></label>
<?php echo $form->input("from", "text"); ?>
</li>

<li>
<label><?php echo T("Authentication"); ?></label>
<div class='checkboxGroup'>
Expand Down

0 comments on commit a6adfe2

Please sign in to comment.