Let's say there is an email alice@example.com. A send-as has been set up for bob@example.com.
When I send an email to someone from alice@ account using bob@ as the sender, the headers usually have a key-value pair with Sender
as the key. This Sender is used to identify that alice@ had sent the email. The From
header will be bob@.
But for one Gmail account, there is no Sender
in the headers. Is there any other way to reliably identify the sender?
Here is the gmail headers without the Sender
{
'internalDate': '1519112776000',
'historyId': '11018249',
'payload': {
'mimeType': 'multipart/alternative',
'headers': [
{
'name': 'MIME-Version',
'value': '1.0'
},
{
'name': 'Received',
'value': 'by 13.133.13.13 with HTTP; Mon, 19 Feb 2018 23:46:16 -0800 (PST)'
},
{
'name': 'Date',
'value': 'Tue, 20 Feb 2018 15:46:16 +0800'
},
{
'name': 'Delivered-To',
'value': 'alice@example.com'
},
{
'name': 'Message-ID',
'value': '<090-SomeRAnDOMMESsageIDGivenByGoogle@mail.gmail.com>'
},
{
'name': 'Subject',
'value': 'This is some random subject'
},
{
'name': 'From',
'value': 'Alice as Bob <bob@example.com>'
},
{
'name': 'To',
'value': 'Troce <troce@random.com>'
},
{
'name': 'Content-Type',
'value': 'multipart/alternative; boundary="000somerandomboundary"'
}
]
},
'snippet': 'This is some random snippet',
'sizeEstimate': 3368,
'threadId': '161b22d6b3213213',
'labelIds': [
'Label_1',
'Label_2',
'Label_3',
'SENT'
],
'id': '161b22d6b3213213'
}