1
我正在使用php-ews發送郵件,而且我無法找到設置郵件重要性(優先級)的方法。 這裏是我的代碼:php-ews如何在發送電子郵件時設置重要性
$from = $mail['from'];
$to = $mail['to'];
$subject = $mail['subject'];
$body = $mail['body'];
$msg = new EWSType_MessageType();
if($to && count($to) > 0){
$toAddresses = $this->getAddresses($to);
$msg->ToRecipients = $toAddresses;
}
$fromAddress = new EWSType_EmailAddressType();
$fromAddress->EmailAddress = $from['mail'];
$fromAddress->Name = $from['name'];
$msg->From = new EWSType_SingleRecipientType();
$msg->From->Mailbox = $fromAddress;
$msg->Subject = $subject;
$msg->Body = new EWSType_BodyType();
$msg->Body->BodyType = 'HTML';
$msg->Body->_ = $body;
$msgRequest = new EWSType_CreateItemType();
$msgRequest->Items = new EWSType_NonEmptyArrayOfAllItemsType();
$msgRequest->Items->Message = $msg;
$msgRequest->MessageDisposition = 'SendAndSaveCopy';
$msgRequest->MessageDispositionSpecified = true;
$response = $this->ews->CreateItem($msgRequest);
return $response;
預先感謝您的迴應!
你可能使用EWS託管API爲C#,它是EWS Web服務的包裝器。在我的情況下,我無法使用它。 謝謝你的迴應。 – 2013-03-27 13:28:38