当前位置: 首页>>代码示例>>PHP>>正文


PHP ezcMailTools::replyToMail方法代码示例

本文整理汇总了PHP中ezcMailTools::replyToMail方法的典型用法代码示例。如果您正苦于以下问题:PHP ezcMailTools::replyToMail方法的具体用法?PHP ezcMailTools::replyToMail怎么用?PHP ezcMailTools::replyToMail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ezcMailTools的用法示例。


在下文中一共展示了ezcMailTools::replyToMail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testReplyToReply

 public function testReplyToReply()
 {
     $mail = new ezcMail();
     $mail->addTo(new ezcMailAddress('fh@ez.no', 'Fræderik Hølljen', 'ISO-8859-1'));
     $address = new ezcMailAddress('test@example.com', 'Reply Går', 'ISO-8859-1');
     $mail->setHeader('Reply-To', ezcMailTools::composeEmailAddress($address));
     // $mail->setHeader( 'Reply-To', 'test@example.com' );
     $reply = ezcMailTools::replyToMail($mail, new ezcMailAddress('test@example.com', 'Reply Går', 'ISO-8859-1'));
     $this->assertEquals($reply->to, array(new ezcMailAddress('test@example.com', "Reply GÃ¥r", 'utf-8')));
 }
开发者ID:jacomyma,项目名称:GEXF-Atlas,代码行数:10,代码来源:tools_test.php

示例2: var_dump

$addresses = '=?ISO-8859-1?B?SsO4aG4gRG9l?= <john@example.com>, Jane Doe <jane@example.com';
// Convert ezcMailAddress to string representation
var_dump(ezcMailTools::composeEmailAddress($mailAddresses[0]));
var_dump(ezcMailTools::composeEmailAddresses($mailAddresses));
// Convert string to ezcMailAddress
var_dump(ezcMailTools::parseEmailAddress($addresses));
var_dump(ezcMailTools::parseEmailAddresses($addresses));
// Validate an email address (with a regular expression, without checking for MX records)
$isValid = ezcMailTools::validateEmailAddress('john.doe@example.com');
// Validate an email address with MX records check.
// MX record checking does not work on Windows due to the lack of getmxrr()
// and checkdnsrr() PHP functions. The ezcBaseFunctionalityNotSupportedException
// is thrown in this case.
// set this to your mail server, it is used in a
// 'HELO SMTP' command to validate against MX records
ezcMailTools::$mxValidateServer = 'your.mail.server';
// set this to a mail address such as 'postmaster@example.com', it is used in a
// 'MAIL FROM' SMTP command to validate against MX records
ezcMailTools::$mxValidateAddress = 'email.address@mail.server';
$isValid = ezcMailTools::validateEmailAddress('john.doe@example.com', true);
// Create a new mail object
$mail = new ezcMail();
$mail->from = $mailAddresses[1];
$mail->addTo($mailAddresses[0]);
$mail->subject = "Top secret";
// Use the lineBreak() method
$mail->body = new ezcMailText("Confidential" . ezcMailTools::lineBreak() . "DO NOT READ");
$mail->generate();
// Create a reply message to the previous mail object
$reply = ezcMailTools::replyToMail($mail, new ezcMailAddress('test@example.com', 'Reply Guy'));
开发者ID:notion,项目名称:zeta-mail,代码行数:30,代码来源:tutorial_tools.php


注:本文中的ezcMailTools::replyToMail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。