MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / sendVerificationEmail

Method sendVerificationEmail

lib/models/email.ts:539–583  ·  view source on GitHub ↗
(
    email: string,
    verificationCode: string,
  )

Source from the content-addressed store, hash-verified

537 }
538
539 static async sendVerificationEmail(
540 email: string,
541 verificationCode: string,
542 ) {
543 const emailTitle = 'Verify your email in bewCloud';
544
545 const textBody = `
546${emailTitle}
547------------------------
548
549You or someone who knows your email is trying to verify it in bewCloud.
550
551Here's the verification code:
552
553**${verificationCode}**
554===============================
555
556This code will expire in 30 minutes.
557 `;
558
559 const htmlBody = this.getHtmlBody(
560 emailTitle,
561 `
562 <h1>${escapeHtml(emailTitle)}</h1>
563 <p>You or someone who knows your email is trying to verify it in bewCloud.</p>
564 <p>Here's the verification code:</p>
565 <table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
566 <tr>
567 <td align="center">
568 <table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
569 <tr>
570 <td align="center">
571 <span class="f-fallback button button--green">${escapeHtml(verificationCode)}</span>
572 </td>
573 </tr>
574 </table>
575 </td>
576 </tr>
577 </table>
578 <p>This code will expire in 30 minutes.</p>
579 `,
580 );
581
582 await this.send(email, emailTitle, htmlBody, textBody);
583 }
584
585 static async sendLoginVerificationEmail(
586 email: string,

Callers 3

postFunction · 0.80
postFunction · 0.80
postFunction · 0.80

Calls 3

getHtmlBodyMethod · 0.95
sendMethod · 0.95
escapeHtmlFunction · 0.90

Tested by

no test coverage detected