diff --git a/assets/js/src/settings/pages/index.tsx b/assets/js/src/settings/pages/index.tsx index d63b4ffe9b..837c599dbf 100644 --- a/assets/js/src/settings/pages/index.tsx +++ b/assets/js/src/settings/pages/index.tsx @@ -2,6 +2,6 @@ export { default as Basics } from './basics/basics'; export { default as Advanced } from './advanced/advanced'; export { default as KeyActivation } from './key_activation/key_activation'; export { default as SendWith } from './send_with/send_with'; -export { default as OtherSendingMethods } from './send_with/other_sending_methods'; +export { default as OtherSendingMethods } from './send_with/other/other_sending_methods'; export { default as SignupConfirmation } from './signup_confirmation/signup_confirmation'; export { default as WooCommerce } from './woo_commerce/woo_commerce'; diff --git a/assets/js/src/settings/pages/send_with/other/other_sending_methods.tsx b/assets/js/src/settings/pages/send_with/other/other_sending_methods.tsx new file mode 100644 index 0000000000..5b91bc18b8 --- /dev/null +++ b/assets/js/src/settings/pages/send_with/other/other_sending_methods.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import SendingMethod from './sending_method'; + +export default function OtherSendingMethods() { + return ( +
+ +
+ ); +} diff --git a/assets/js/src/settings/pages/send_with/other/sending_method.tsx b/assets/js/src/settings/pages/send_with/other/sending_method.tsx new file mode 100644 index 0000000000..23b2fd6d0e --- /dev/null +++ b/assets/js/src/settings/pages/send_with/other/sending_method.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { Label, Inputs } from 'settings/components'; +import { t, onChange } from 'common/functions'; +import { useSetting } from 'settings/store/hooks'; + +export default function SendingMethod() { + const [provider, setProvider] = useSetting('smtp_provider'); + const [, setMethod] = useSetting('mta', 'method'); + const updateProvider = (value: 'server' | 'manual' | 'AmazonSES' | 'SendGrid') => { + setProvider(value); + switch (value) { + case 'server': setMethod('PHPMail'); break; + case 'manual': setMethod('SMTP'); break; + case 'AmazonSES': setMethod('AmazonSES'); break; + case 'SendGrid': setMethod('AmazonSES'); break; + default: + } + }; + + return ( + <> +