mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use parsed from, to and subject from email headers
This commit is contained in:
parent
23379a825f
commit
7d608ed2cb
1 changed files with 3 additions and 3 deletions
|
|
@ -66,8 +66,8 @@ export const inboundEmailHandler = Sentry.GCPFunction.wrapHttpFunction(
|
|||
console.log('headers: ', headers)
|
||||
|
||||
// original sender email address
|
||||
const from = headers['from'].toString()
|
||||
const subject = headers['subject']?.toString()
|
||||
const from = parsed['from']
|
||||
const subject = parsed['subject']
|
||||
const html = parsed['html']
|
||||
const text = parsed['text']
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ export const inboundEmailHandler = Sentry.GCPFunction.wrapHttpFunction(
|
|||
const forwardedFrom = headers['x-forwarded-for']?.toString().split(' ')[0]
|
||||
|
||||
// if an email is forwarded to the inbox, the to is the forwarding email recipient
|
||||
const to = forwardedTo || headers['to'].toString()
|
||||
const to = forwardedTo || parsed['to']
|
||||
const postHeader = headers['list-post']?.toString()
|
||||
const unSubHeader = headers['list-unsubscribe']?.toString()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue