From bd26d64a1c30165a2c7c88108a2571210bb83913 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 20 Oct 2019 20:14:04 -0400 Subject: [PATCH] email user upon domain bind --- src/commands/cwg.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index 4bb7260..b5a58b1 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -47,6 +47,24 @@ export default class CWG extends Command { this.client.createMessage('580950455581147146', { embed }); // @ts-ignore this.client.getDMChannel(account.userID).then((r) => r.createMessage({ embed })); + await this.client.util.transport.sendMail({ + to: account.emailAddress, + from: 'Library of Code sp-us | Support Team ', + subject: 'Your domain has been binded', + html: ` +

Library of Code sp-us | Cloud Services

+

Hello, this is an email informing you that a new domain under your account has been binded. + Information is below.

+ Domain: ${domain.domain} + Port: ${domain.port} + Certificate Issuer: ${cert.issuer.organizationName} + Certificate Subject: ${cert.subject.commonName} + Responsible Engineer ${message.author.username}#${message.author.discriminator} + + If you have any questions about additional setup, you can reply to this email or send a message in #cloud-support in our Discord server. + Thanks. + `, + }); if (!domain.domain.includes('cloud.libraryofcode.org')) { const content = `_**DNS Record Setup**__\nYou recently a binded a custom domain to your Library of Code sp-us Account. You'll have to update your DNS records. We've provided the records below.\n\n\`${domain.domain} IN CNAME cloud.libraryofcode.us AUTO/500\`\nThis basically means you need to make a CNAME record with the key/host of ${domain.domain} and the value/point to cloud.libraryofcode.org. If you have any questions, don't hesitate to ask us.`; this.client.getDMChannel(account.userID).then((r) => r.createMessage(content));