server-core-module 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/email.service.ts +17 -3
package/package.json
CHANGED
|
@@ -51,14 +51,28 @@ export async function sendOrderConfirmation(email: string, name: string, items:
|
|
|
51
51
|
|
|
52
52
|
export async function sendOrderStatusUpdate(email: string, name: string, status: string) {
|
|
53
53
|
try {
|
|
54
|
+
|
|
55
|
+
let subject = `Order ${status}! 🌸`
|
|
56
|
+
let message = `Your order is now <strong>${status}</strong>! 🌸`
|
|
57
|
+
|
|
58
|
+
if(status === 'confirmed') {
|
|
59
|
+
subject = 'Order Confirmed! 🌸'
|
|
60
|
+
message = 'We are now preparing your beautiful flowers! 🌸'
|
|
61
|
+
} else if(status === 'out_for_delivery') {
|
|
62
|
+
subject = 'Your Order is On the Way! 🏍️'
|
|
63
|
+
message = 'Your flowers are on the way! Our rider is heading to your location. 🏍️🌸'
|
|
64
|
+
} else if(status === 'delivered') {
|
|
65
|
+
subject = 'Order Delivered! 🌸'
|
|
66
|
+
message = 'Your flowers have been delivered! We hope you love them. Thank you for choosing Cesar\'s Flower Shop! 🌸'
|
|
67
|
+
}
|
|
54
68
|
|
|
55
69
|
resend.emails.send({
|
|
56
|
-
|
|
70
|
+
from: "Cesar's Flower Shop 🌸 <noreply@cesarsflowershop.com>",
|
|
57
71
|
to: email,
|
|
58
|
-
subject:
|
|
72
|
+
subject: subject,
|
|
59
73
|
html: `
|
|
60
74
|
<h2>Hi ${name}!</h2>
|
|
61
|
-
<p>
|
|
75
|
+
<p> ${message} 🌸</p>
|
|
62
76
|
<br/>
|
|
63
77
|
<p>Thank you for ordering from Cesar's Flower Shop!</p>
|
|
64
78
|
`,
|