Skip to content

Commit

Permalink
Update host and port with service config on select
Browse files Browse the repository at this point in the history
When changing email services the host and port were not changing, kept
original. This update assigns the host/port from the service info.

Additional fix for #2630
  • Loading branch information
aaronjudd committed Aug 26, 2017
1 parent dcb23fa commit 29196ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions imports/plugins/core/email/client/components/emailSettings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import getServiceConfig from "nodemailer-wellknown";
import { Components } from "@reactioncommerce/reaction-components";

class EmailSettings extends Component {
Expand Down Expand Up @@ -33,6 +34,9 @@ class EmailSettings extends Component {
handleSelect(e) {
const { settings } = this.state;
settings.service = e;
const config = getServiceConfig(settings.service);
settings.host = config.host;
settings.port = config.port;
this.setState({ settings });
}

Expand Down

0 comments on commit 29196ae

Please sign in to comment.