mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 11:46:23 +00:00
Disabled email sending, if no mail server is configured.
This commit is contained in:
parent
5e845b8aa6
commit
98c99d906e
1 changed files with 5 additions and 0 deletions
|
|
@ -156,6 +156,11 @@ export async function sendTxn (mailingInfoArray, emailType, variables, personalV
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_PROD && mailingInfoArray.length > 0) {
|
if (IS_PROD && mailingInfoArray.length > 0) {
|
||||||
|
if (EMAIL_SERVER.url === undefined || EMAIL_SERVER.url === '') {
|
||||||
|
logger.info('Will not send email, because there is no mail server configured.');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return got.post(`${EMAIL_SERVER.url}/job`, {
|
return got.post(`${EMAIL_SERVER.url}/job`, {
|
||||||
retry: 5, // retry the http request to the email server 5 times
|
retry: 5, // retry the http request to the email server 5 times
|
||||||
timeout: 60000, // wait up to 60s before timing out
|
timeout: 60000, // wait up to 60s before timing out
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue