Skip to content

Commit

Permalink
added support for sending to smtp (sillsdev#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbagwill authored Aug 11, 2023
1 parent ab12c13 commit e410498
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/lib/emails/notify.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<script>
import { Button, Container, Head, Hr, Html, Img, Preview, Section, Text } from 'svelte-email';
import { PUBLIC_DEPLOYMENT_LINK } from '$env/static/public';
export let pack;
const link = `${PUBLIC_DEPLOYMENT_LINK}/admin`;
</script>

<Html lang="en">
Expand All @@ -17,7 +19,7 @@
<Text>Region: {pack.app_lang.regionname}</Text>
<Text>Language Code: {pack.app_lang.iso639_3.toUpperCase()}</Text>
</Container>
<Button href="/admin">View Package</Button>
<Button href={link}>View Package</Button>
</Container>
</Section>
</Html>
Expand Down
6 changes: 4 additions & 2 deletions src/routes/submit/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
PUBLIC_NODEMAILER_PORT,
PUBLIC_NODEMAILER_USER,
PUBLIC_NODEMAILER_PASSWORD,
PUBLIC_NODEMAILER_SENDER
PUBLIC_NODEMAILER_SENDER,
PUBLIC_NODEMAILER_SECURE
} from '$env/static/public';
import { addDoc, collection } from 'firebase/firestore';
import { allKeys, initKeys } from '$lib/stores/keys.js';
Expand All @@ -20,7 +21,8 @@ const transporter = nodemailer.createTransport({
auth: {
user: PUBLIC_NODEMAILER_USER,
pass: PUBLIC_NODEMAILER_PASSWORD
}
},
secure: PUBLIC_NODEMAILER_SECURE
});

let recipients = [];
Expand Down

0 comments on commit e410498

Please sign in to comment.