Add TO field to SMTP config

pull/10616/head
deniz kusefoglu 2018-02-05 15:37:10 -08:00
parent 81bf0e80c7
commit c71c4ac648
1 changed files with 15 additions and 2 deletions

View File

@ -15,6 +15,7 @@ class SMTPConfig extends Component {
host: this.host.value,
port: this.port.value,
from: this.from.value,
to: this.to.value ? [this.to.value] : [],
username: this.username.value,
password: this.password.value,
}
@ -29,7 +30,7 @@ class SMTPConfig extends Component {
}
render() {
const {host, port, from, username, password} = this.props.config.options
const {host, port, from, username, password, to} = this.props.config.options
return (
<form onSubmit={this.handleSubmit}>
@ -57,7 +58,7 @@ class SMTPConfig extends Component {
/>
</div>
<div className="form-group col-xs-12">
<div className="form-group col-xs-6">
<label htmlFor="smtp-from">From Email</label>
<input
className="form-control"
@ -70,6 +71,18 @@ class SMTPConfig extends Component {
/>
</div>
<div className="form-group col-xs-12 col-md-6">
<label htmlFor="smtp-to">To Email</label>
<input
className="form-control"
id="smtp-to"
type="text"
ref={r => (this.to = r)}
defaultValue={to || ''}
onChange={this.disableTest}
/>
</div>
<div className="form-group col-xs-12 col-md-6">
<label htmlFor="smtp-user">User</label>
<input