本文整理匯總了PHP中InboundEmail::decodeHeader方法的典型用法代碼示例。如果您正苦於以下問題:PHP InboundEmail::decodeHeader方法的具體用法?PHP InboundEmail::decodeHeader怎麽用?PHP InboundEmail::decodeHeader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InboundEmail
的用法示例。
在下文中一共展示了InboundEmail::decodeHeader方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testDecodingHeader
/**
* @dataProvider getDecodingHeader
* @param string $url
*/
function testDecodingHeader($header, $res)
{
$ie = new InboundEmail();
$this->assertEquals($res, $ie->decodeHeader($header));
}
示例2: testdecodeHeader
public function testdecodeHeader()
{
//unset and reconnect Db to resolve mysqli fetch exeception
global $db;
unset($db->database);
$db->checkConnection();
$inboundEmail = new InboundEmail();
$expected = array('From' => 'Media Temple user (mt.kb.user@gmail.com)', 'Subject' => 'article: How to Trace a Email', 'Date' => 'January 25, 2011 3:30:58 PM PDT', 'To' => 'user@example.com', 'Return-Path' => '<mt.kb.user@gmail.com>', 'Envelope-To' => 'user@example.com', 'Delivery-Date' => 'Tue, 25 Jan 2011 15:31:01 -0700');
$header = "From: Media Temple user (mt.kb.user@gmail.com)\r\nSubject: article: How to Trace a Email\r\nDate: January 25, 2011 3:30:58 PM PDT\r\nTo: user@example.com\r\nReturn-Path: <mt.kb.user@gmail.com>\r\nEnvelope-To: user@example.com\r\nDelivery-Date: Tue, 25 Jan 2011 15:31:01 -0700";
$result = $inboundEmail->decodeHeader($header);
$this->assertEquals($expected, $result);
}