Skip to content

Commit aec3002

Browse files
committed
Sender ID wasn't being passed to SendGrid
1 parent c221b58 commit aec3002

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/actions/render-newsletter/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/render-newsletter/src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,22 @@ async function run(options: Options) {
211211
subject: (options.subject ?? '%s').replace('%s', context.post.title),
212212
categories: ['newsletter'],
213213
id,
214+
senderId: options.senderId,
214215
});
215216

216217
const url = response.headers.get('location');
217218

218219
if (response.ok) {
219220
const ssend: SG.ScheduledSend = await response.json();
221+
console.log('Single send created', ssend);
222+
220223
if (ssend.status === 'draft') {
221224
console.log('Scheduling');
222-
await SG.scheduleSingleSend({ id: ssend.id, sendAt, token: options.apiKey });
225+
await SG.scheduleSingleSend({
226+
id: ssend.id,
227+
sendAt,
228+
token: options.apiKey,
229+
});
223230
}
224231

225232
setOutput('send_date', sendAt.toISOString());

0 commit comments

Comments
 (0)