|
|
@@ -6,6 +6,7 @@ import { apiPath } from 'auth/utils'; |
|
|
|
const TestMailPage = () => { |
|
|
|
const [host, setHost] = useState(apiPath+'/test'); |
|
|
|
const [mail, setMail] = useState(''); |
|
|
|
const [tempKey, setTempKey] = useState(''); |
|
|
|
|
|
|
|
const hostChange = (event) => { |
|
|
|
setHost(event.target.value); |
|
|
@@ -15,9 +16,14 @@ const TestMailPage = () => { |
|
|
|
setMail(event.target.value); |
|
|
|
}; |
|
|
|
|
|
|
|
const tempKeyChange = (event) => { |
|
|
|
setTempKey(event.target.value); |
|
|
|
}; |
|
|
|
|
|
|
|
const doMailTest = () => { |
|
|
|
axios.post(host, { |
|
|
|
email: mail |
|
|
|
email: mail, |
|
|
|
tempKey: tempKey, |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
console.log(response.data); |
|
|
@@ -41,8 +47,9 @@ const TestMailPage = () => { |
|
|
|
} |
|
|
|
}} |
|
|
|
spacing={3}> |
|
|
|
<Grid item xs={12}><TextField id='hostField' label='Outlined' variant='filled' onChange={hostChange} value={host} fullWidth /></Grid> |
|
|
|
<Grid item xs={12}><TextField id='mailField' label='Outlined' variant='filled' onChange={mailChange} value={mail} fullWidth /></Grid> |
|
|
|
<Grid item xs={12}><TextField id='hostField' label='Email Api' variant='filled' onChange={hostChange} value={host} fullWidth /></Grid> |
|
|
|
<Grid item xs={12}><TextField id='mailField' label='Target Email' variant='filled' onChange={mailChange} value={mail} fullWidth /></Grid> |
|
|
|
<Grid item xs={12}><TextField id='mailField' label='Email Template Key' variant='filled' onChange={tempKeyChange} value={tempKey} fullWidth /></Grid> |
|
|
|
<Grid item xs={12}><Button variant='contained' onClick={doMailTest}>Test</Button></Grid> |
|
|
|
</Grid> |
|
|
|
); |
|
|
|