mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-20 16:32:16 +00:00
refactor: dependency updates
This commit is contained in:
@@ -28,10 +28,9 @@
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/nodemailer": "8.0.2",
|
||||
"chalk": "5.2.0",
|
||||
"flatted": "3.2.7",
|
||||
"nodemailer": "8.0.11"
|
||||
"flatted": "3.4.4",
|
||||
"nodemailer": "10.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
|
||||
@@ -312,19 +312,19 @@ export class SMTP extends VerifiableTransport {
|
||||
*/
|
||||
public async sendMail(mail: SendMailOptions): Promise<string> {
|
||||
// info is the response of the smtp server
|
||||
let info = await this.transportAgent.sendMail(mail);
|
||||
const info = await this.transportAgent.sendMail(mail);
|
||||
|
||||
// it can be undefined (empty response)
|
||||
if (info === undefined) {
|
||||
info = 'Successfully sent mail';
|
||||
(info['message'] as string) = 'Successfully sent mail';
|
||||
}
|
||||
|
||||
// or not of type string
|
||||
if (typeof info !== 'string') {
|
||||
info = JSON.stringify(info);
|
||||
(info.message as string) = JSON.stringify(info.message);
|
||||
}
|
||||
|
||||
return info;
|
||||
return info.message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user