invite.js
3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
import { Email } from 'meteor/email'
import {moment} from 'meteor/momentjs:moment'
moment.locale('en-au');
export const sendInviteEmail = ({email, firstName, orgName, token}) => {
const url = Meteor.absoluteUrl(`invite/${token}`);
const text = `
Hello, ${firstName}!
You have been invited to join the ${orgName} on Blok8 wallet.
To join, use the following link:
${url}
`;
Email.send({
from: 'YoungDesk <support@youngdesk.com>',
to: email,
subject: `[YoungDesk] Invitation`,
text: text,
});
};
export const sendChangeSharePriceEmail = ({orgName, firstName, lastName, price, email}) => {
const text = `
Hi ${firstName},
The current share price has been changed to $A${price} for the company ${orgName}.
`;
Email.send({
from: 'Blok 8 <support@youngdesk.com>',
to: email,
subject: `[Blok8] Share price has changed for ${orgName}.`,
text: text,
});
};
export const sendChangeNameEmail = ({firstName, lastName, email}) => {
console.log(firstName);
console.log(lastName);
console.log(email);
const text = `
Hi ${firstName},
Your name has been changed to "${firstName} ${lastName}".
If you did not change your name, please reset your password.
`;
Email.send({
from: 'Blok 8 <support@youngdesk.com>',
to: email,
subject: `[Blok8] - Name Change`,
text: text,
});
};
export const sendChangePasswordEmail = ({firstName, lastName, email}) => {
console.log(firstName);
console.log(lastName);
console.log(email);
let date = moment().format('LLL');
const text = `
Hi ${firstName},
Your password was recently changed on ${date}.
If you did not change your password, please reset your password immediately.
`;
Email.send({
from: 'Blok 8 <support@youngdesk.com>',
to: email,
subject: `[Blok8] - Password Change`,
text: text,
});
};
export const sendChangeEmail = ({firstName, lastName, email, newEmail}) => {
console.log(firstName);
console.log(lastName);
console.log(email);
let date = moment().format('LLL');
const text = `
Hi ${firstName},
Your email address was recently changed on ${newEmail} on ${date}.
If you did not change your email address, please contact us immediately by responding to this email.
`;
Email.send({
from: 'Blok 8 <support@youngdesk.com>',
to: email,
subject: `[Blok8] - Email Change`,
text: text,
});
};
export const sendIssueSharesEmail = ({orgName, firstName, lastName, quantity, purchasePrice, shareClass,email}) => {
console.log(quantity);
console.log(purchasePrice);
console.log(shareClass);
console.log(email);
const text = `
Hi ${firstName},
${quantity} ${shareClass} shares in ${orgName} have been issued to you for A$${purchasePrice} in total.
`;
Email.send({
from: 'Blok 8 <support@youngdesk.com>',
to: email,
subject: `[Blok8] New shares have been issued to you in ${orgName}.`,
text: text,
});
};
export const sendNewAnnouncementsEmail = ({orgId, orgName, createdByUser, title, description, uniqueUrl, firstName, lastName, email}) => {
const text = `
Hi ${firstName},
A new announcement has been issued by the company secretary!
Title: ${title}.
`;
Email.send({
from: 'Blok 8 <support@youngdesk.com>',
to: email,
subject: `[Blok8] ${orgName} - New Announcement`,
text: text,
});
};
export const sendIssueDividendsEmail = ({ orgId, orgName, dividend, firstName, lastName, email }) => {
const text = `
Hi ${firstName}!
A new dividend has been issued at $A${dividend} per ordinary share for the company "${orgName}".
`;
Email.send({
from: 'Blok 8 <support@mystake.io>',
to: email,
subject: `[Blok8] A new dividend has been issued by ${orgName}`,
text: text,
});
};