Skip to content

Commit

Permalink
pls work
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyangzheng committed Mar 23, 2024
1 parent b7e7e97 commit 8628331
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/server/src/postmark/postmark.service.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { Injectable } from '@nestjs/common';
import { ServerClient } from 'postmark';

const client = new ServerClient(process.env.POSTMARK_SERVER_KEY || '');

@Injectable()
export class PostmarkService {
constructor() {}
client: ServerClient;

constructor() {
this.client = new ServerClient(process.env.POSTMARK_SERVER_KEY as string);
}

async sendEmail(to: string, subject: string, textBody: string) {
try {
client.sendEmail({
this.client.sendEmail({
From: 'jfrederick@mfa.org',
To: to,
Subject: subject,
Expand Down

0 comments on commit 8628331

Please sign in to comment.