feat: include bounce reason in export (#226)
This commit is contained in:
@@ -122,9 +122,27 @@ export default function EmailsList() {
|
||||
return /[",\r\n]/.test(safe) ? `"${safe}"` : safe;
|
||||
};
|
||||
|
||||
const header = ["To", "Status", "Subject", "Sent At"].join(",");
|
||||
const header = [
|
||||
"To",
|
||||
"Status",
|
||||
"Subject",
|
||||
"Sent At",
|
||||
"Bounce Type",
|
||||
"Bounce Subtype",
|
||||
"Bounce Reason",
|
||||
].join(",");
|
||||
const rows = resp.data.map((e) =>
|
||||
[e.to, e.status, e.subject, e.sentAt].map(escape).join(","),
|
||||
[
|
||||
e.to,
|
||||
e.status,
|
||||
e.subject,
|
||||
e.sentAt,
|
||||
e.bounceType,
|
||||
e.bounceSubType,
|
||||
e.bounceReason,
|
||||
]
|
||||
.map(escape)
|
||||
.join(","),
|
||||
);
|
||||
const csv = [header, ...rows].join("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user