Add AmazonSES fields
[MAILPOET-2693]
This commit is contained in:
committed by
Veljko V
parent
b3c347f3f0
commit
741674f4e4
@@ -0,0 +1,47 @@
|
||||
import React from 'react';
|
||||
import { Label, Inputs } from 'settings/components';
|
||||
import { t, onChange } from 'common/functions';
|
||||
import { useSetting } from 'settings/store/hooks';
|
||||
import SendingFrequency from './sending_frequency';
|
||||
|
||||
export default function AmazonSesFields() {
|
||||
const [region, setRegion] = useSetting('mta', 'region');
|
||||
const [accessKey, setAccessKey] = useSetting('mta', 'access_key');
|
||||
const [secretKey, setSecretKey] = useSetting('mta', 'secret_key');
|
||||
return (
|
||||
<>
|
||||
<SendingFrequency recommendedEmails="100" recommendedInterval="5" />
|
||||
<Label title={t('region')} htmlFor="mailpoet_amazon_ses_region" />
|
||||
<Inputs>
|
||||
<select id="mailpoet_amazon_ses_region" value={region} onChange={onChange(setRegion)}>
|
||||
<option value="us-east-1">US East (N. Virginia)</option>
|
||||
<option value="us-west-2">US West (Oregon)</option>
|
||||
<option value="eu-west-1">EU (Ireland)</option>
|
||||
<option value="eu-central-1">EU (Frankfurt)</option>
|
||||
<option value="ap-south-1">Asia Pacific (Mumbai)</option>
|
||||
<option value="ap-southeast-2">Asia Pacific (Sydney)</option>
|
||||
</select>
|
||||
</Inputs>
|
||||
<Label title={t('accessKey')} htmlFor="mailpoet_amazon_ses_access_key" />
|
||||
<Inputs>
|
||||
<input
|
||||
type="text"
|
||||
value={accessKey}
|
||||
className="regular-text"
|
||||
onChange={onChange(setAccessKey)}
|
||||
id="mailpoet_amazon_ses_access_key"
|
||||
/>
|
||||
</Inputs>
|
||||
<Label title={t('secretKey')} htmlFor="mailpoet_amazon_ses_secret_key" />
|
||||
<Inputs>
|
||||
<input
|
||||
type="text"
|
||||
value={secretKey}
|
||||
className="regular-text"
|
||||
onChange={onChange(setSecretKey)}
|
||||
id="mailpoet_amazon_ses_secret_key"
|
||||
/>
|
||||
</Inputs>
|
||||
</>
|
||||
);
|
||||
}
|
@@ -6,6 +6,7 @@ import TestSending from './test_sending';
|
||||
import ActivateOrCancel from './activate_or_cancel';
|
||||
import PHPMailFields from './php_mail_fields';
|
||||
import SmtpFields from './smtp_fields';
|
||||
import AmazonSesFields from './amazon_ses_fields';
|
||||
|
||||
export default function OtherSendingMethods() {
|
||||
const [method] = useSetting('mta', 'method');
|
||||
@@ -14,6 +15,7 @@ export default function OtherSendingMethods() {
|
||||
<SendingMethod />
|
||||
{method === 'PHPMail' && <PHPMailFields />}
|
||||
{method === 'SMTP' && <SmtpFields />}
|
||||
{method === 'AmazonSES' && <AmazonSesFields />}
|
||||
<SPF />
|
||||
<TestSending />
|
||||
<ActivateOrCancel />
|
||||
|
Reference in New Issue
Block a user