@live-change/email-service 0.8.84 → 0.8.86
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 +3 -3
- package/render.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/email-service",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.86",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "^0.8.
|
|
24
|
+
"@live-change/framework": "^0.8.86",
|
|
25
25
|
"got": "^11.8.3",
|
|
26
26
|
"html-to-text": "8.1.0",
|
|
27
27
|
"inline-css": "4.0.2",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"juice": "11.0.0",
|
|
30
30
|
"nodemailer": "^6.7.2"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "3db6ec0c618b4e17974a525ef184fa6fae9b8ee0",
|
|
33
33
|
"type": "module"
|
|
34
34
|
}
|
package/render.js
CHANGED
|
@@ -133,6 +133,14 @@ async function renderEmail(data) {
|
|
|
133
133
|
const imageUrl = new URL(imagePath, url)
|
|
134
134
|
const file = path.resolve(publicDir, imageUrl.pathname.slice(1))
|
|
135
135
|
const filename = path.basename(file)
|
|
136
|
+
if(imagePath.startsWith('http')) {
|
|
137
|
+
console.log("EXTERNAL IMAGE", imagePath)
|
|
138
|
+
return {
|
|
139
|
+
path: imagePath,
|
|
140
|
+
cid: contentId,
|
|
141
|
+
filename
|
|
142
|
+
}
|
|
143
|
+
}
|
|
136
144
|
return {
|
|
137
145
|
filename,
|
|
138
146
|
path: file,
|