diff --git a/assets/js/src/settings/pages/send_with/send_with.tsx b/assets/js/src/settings/pages/send_with/send_with.tsx index b578b9651c..bd1d3177a1 100644 --- a/assets/js/src/settings/pages/send_with/send_with.tsx +++ b/assets/js/src/settings/pages/send_with/send_with.tsx @@ -6,6 +6,7 @@ import { useSelector, useAction, useSetting } from 'settings/store/hooks'; import { MssStatus } from 'settings/store/types'; import { t } from 'common/functions'; import { Link } from 'react-router-dom'; +import checkSPFRecord from 'common/check_spf_record'; export default function SendWith() { const isNewUser = useSelector('isNewUser')(); @@ -22,7 +23,8 @@ export default function SendWith() { await setSetting(['mta', 'method'], 'MailPoet'); await setSetting(['mta', 'mailpoet_api_key'], key); await setSetting(['signup_confirmation', 'enabled'], '1'); - return saveSettings(); + await saveSettings(); + return checkSPFRecord(); }; return ( diff --git a/views/settings/mta.html b/views/settings/mta.html index 0956910aad..335a6c6d93 100644 --- a/views/settings/mta.html +++ b/views/settings/mta.html @@ -695,16 +695,12 @@ // enforce signup confirmation depending on selected group setSignupConfirmation(group); - // back to selection of sending methods - if (navigateToTab === undefined || navigateToTab === true) { - MailPoet.Router.navigate('mta', { trigger: true }); - } - // save settings $('.mailpoet_settings_submit > input').trigger('click'); - if (group === 'mailpoet') { - updateMSSActivationUI() + // back to selection of sending methods + if (navigateToTab === undefined || navigateToTab === true) { + MailPoet.Router.navigate('mta', { trigger: true }); } } }