Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get different "To" Email Adresses #599

Open
diggde opened this issue May 15, 2021 · 0 comments
Open

Get different "To" Email Adresses #599

diggde opened this issue May 15, 2021 · 0 comments

Comments

@diggde
Copy link

diggde commented May 15, 2021

Version (e.g. 1.0, dev-master): 1.0
PHP version: 7.2

Description of problem:
I get different "To" email adresses when using Php-Ews compared to outlook header info. How can I get the same "To" email adress like in the outlook header?
Hint: [email protected] is a public folder, [email protected] is an email-alias to this public folder. But I need the real "To" email adress, not the name of the public folder. How can I get this email adress?

Example Header from Outlook (To = [email protected]):

X-NetatworkMailGateway-Sender: [email protected]
From: Update <[email protected]>
To: [email protected]
Message-ID: <0100017969e3bc08-ea9f0a43-53da-4e00-9f00-a28ecf02bb03-000000@domain.com>
Subject: Email Assistance
MIME-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_31921436_177684020.1620979203073"
Bounces-to: [email protected]
Date: Fri, 14 May 2021 08:00:03 +0000
Feedback-ID: 1.us-east-1.ZHcGJK6s+x+i9lRHKog4RW3tECwWIf1xzTYCZyUaiec=:UpdateSES
Return-Path: [email protected]
X-MS-Exchange-Organization-Network-Message-Id: 2f51a1ed-f61f-48bb-d4a4-08d916ae551c
X-MS-Exchange-Organization-AuthSource: EXCHS1.domain.local
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 10
X-MS-Exchange-Organization-AVStamp-Enterprise: 1.0
X-MS-Exchange-Transport-EndToEndLatency: 00:00:00.3350204
X-MS-Exchange-Processed-By-BccFoldering: 15.02.0858.012

Code request:

$request = new GetItemType();
$request->ItemShape = new ItemResponseShapeType();
$request->ItemShape->BaseShape = DefaultShapeNamesType::ALL_PROPERTIES;
$request->ItemShape->BodyType = BodyTypeResponseType::BEST;

Response from Php-Ews (To = [email protected]):

  ["ToRecipients"] => object(jamesiarmes\PhpEws\ArrayType\ArrayOfRecipientsType)#14653 (1) {
    ["Mailbox"] => array(1) {
      [0] => object(jamesiarmes\PhpEws\Type\EmailAddressType)#14654 (5) {
        ["EmailAddress"] => string(17) "[email protected]"
        ["ItemId"] => NULL
        ["MailboxType"] => string(12) "PublicFolder"
        ["Name"] => string(5) "daten"
        ["RoutingType"] => string(4) "SMTP"
      }
    }
  }

Thanks for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant