From 13f1f43132409ef277b4aabc2a448287d0f7029a Mon Sep 17 00:00:00 2001 From: Ian Fung Date: Thu, 14 May 2020 12:04:36 +0800 Subject: [PATCH] Fix SingleEmailMessage sending email without a subject --- src/Phpforce/SoapClient/Soap/SoapClient.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Phpforce/SoapClient/Soap/SoapClient.php b/src/Phpforce/SoapClient/Soap/SoapClient.php index 10a5e13..5cfe201 100755 --- a/src/Phpforce/SoapClient/Soap/SoapClient.php +++ b/src/Phpforce/SoapClient/Soap/SoapClient.php @@ -46,6 +46,10 @@ public function getSoapTypes() $properties = array_merge($properties, $this->types['sObject']); } + if ($typeName == 'SingleEmailMessage' && array_key_exists('Email', $this->types)) { + $properties = array_merge($properties, $this->types['Email']); + } + $this->types[$typeName] = $properties; } }