1
1
import 'dotenv/config'
2
2
import SMTPTransport from 'nodemailer/lib/smtp-transport'
3
+ import { getBase64Image } from '../utils'
3
4
4
5
// the defaults work for tests. you should define your own
5
6
// either via .env file, or via environment variables directly (depends on your setup)
6
7
7
8
// server base url, e.g. to construct correct email verification links
8
9
export const baseUrl = process . env . BASE_URL ?? 'http://localhost:3005'
9
10
11
+ export const appName = process . env . APP_NAME ?? 'Sleepy.Bike'
12
+
13
+ // default is 1 transparent PNG pixel
14
+ export const appLogo = getBase64Image (
15
+ process . env . APP_LOGO ??
16
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' ,
17
+ )
18
+ export const supportEmail = process . env . SUPPORT_EMAIL ?? '[email protected] '
19
+
10
20
// identity under which the mailer is operating
11
21
export const mailerCredentials = {
12
22
email : process . env . MAILER_IDENTITY_EMAIL ?? 'bot@example' ,
@@ -26,7 +36,7 @@ const stringToBoolean = (value: string | undefined): boolean => {
26
36
}
27
37
// SMTP transport for nodemailer (setup for sending emails)
28
38
export const smtpTransportOptions : SMTPTransport . Options = {
29
- host : process . env . SMTP_TRANSPORT_HOST || undefined ,
39
+ host : process . env . SMTP_TRANSPORT_HOST || '0.0.0.0' ,
30
40
port : process . env . SMTP_TRANSPORT_PORT
31
41
? + process . env . SMTP_TRANSPORT_PORT
32
42
: 1025 , // default works for maildev
@@ -39,7 +49,8 @@ export const smtpTransportOptions: SMTPTransport.Options = {
39
49
}
40
50
41
51
// email address which will be the sender of the notifications and email verification messages
42
- export const emailSender = process . env . EMAIL_SENDER
52
+ export const emailSender =
53
+ process . env . EMAIL_SENDER ?? '[email protected] '
43
54
44
55
export const port : number = + ( process . env . PORT ?? 3005 )
45
56
0 commit comments