File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ export interface SMTPUser {
77
88export interface SMTP {
99 id : string ,
10- from : SMTPUser [ ] ,
11- reply_to : SMTPUser [ ] ,
10+ from ? : SMTPUser [ ] ,
11+ reply_to ? : SMTPUser [ ] ,
1212 subject : string ,
13- to : SMTPUser [ ] ,
14- cc : SMTPUser [ ] ,
15- bcc : SMTPUser [ ] ,
13+ to ? : SMTPUser [ ] ,
14+ cc ? : SMTPUser [ ] ,
15+ bcc ? : SMTPUser [ ] ,
1616 text : string ,
1717 html : string ,
1818 raw : string ,
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ const props = defineProps<Props>();
1414const dateFormat = computed (() => moment (props .event .date ).fromNow ());
1515
1616const eventLink = computed (() => ` /smtp/${props .event .id } ` );
17+
18+ const emailRecipient = computed (
19+ () => props ?.event ?.payload ?.to ?.[0 ]?.email || null
20+ );
1721 </script >
1822
1923<template >
@@ -24,7 +28,9 @@ const eventLink = computed(() => `/smtp/${props.event.id}`);
2428 </h3 >
2529
2630 <div class =" smtp-preview__link-text" >
27- <span ><strong >To:</strong > {{ event.payload.to[0].email }} </span >
31+ <span v-if =" emailRecipient"
32+ ><strong >To:</strong > {{ emailRecipient }}
33+ </span >
2834
2935 <span >{{ dateFormat }}</span >
3036 </div >
You can’t perform that action at this time.
0 commit comments