- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试使用 Zend_Mail
发送邮件,代码如下:
function sendMail() {
$config = array('auth' => 'login',
'username' => 'UserName',
'password' => 'Password',
'port'=>'27');
$mail = new Zend_Mail();
$mail->setBodyText($mailBody);
$mail->setFrom('example@host.com', 'The Company Name');
$mail->addTo('example@host.com', 'Recipient Name');
$mail->setSubject('Mail subject');
$mail->send(new Zend_Mail_Transport_Smtp('example@server.com', $config));
}
现在的问题是 $mailBody
有法语字符。例如:
Merci d'avoir passé commande avec Lovre. Voici le récapitulatif de votre commande
当查看发送的邮件时,同一行显示如下:
Merci d'avoir pass? commande avec Lovre. Voici le r?capitulatif de votre commande
重音被问号代替了!我尝试使用 utf8_encode
对邮件正文进行编码,但问题仍然存在。
注意:正文内容是使用 file_get_contents
从文本文件中读取的。
最佳答案
您必须在 Zend_Mail 构造函数中将编码设置为 UTF-8:
$mail = new Zend_Mail('UTF-8');
还要确保 $mailBody 包含 UTF-8 文本。
关于php - 邮件正文中带有法语字符的 Zend_Mail,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9094023/
请告诉我我做错了什么。我正在使用 Zend_Mail 类发送电子邮件,如下所示: $message = setBodyText($message); $mail->setFrom('billing@c
我正在尝试使用 Zend_Mail 发送邮件,代码如下: function sendMail() { $config = array('auth' => 'login',
有没有办法从 Zend_Mail 对象中删除附件?简单的 例子: $mail = new Zend_Mail(); //..configuring the email.. $mail->createA
对于 Zend_Mail(Zend v1.12),有没有办法配置 Zend_Mail 对象以便向每个收件人发送自己的邮件副本?看起来最好的答案是对一组收件人使用 foreach,在每次迭代时清除收件人
我有一个问题,当我想向客户和管理员发送邮件时。 问题是,客户收到邮件,但如果 from = bcc,则密件抄送不会。有没有我错过的设置?这可能是服务器问题,还是与 Zend 相关的问题? 我使用的示例
根据文档,您应该use the getNumberByUniqueId() method在移动/删除电子邮件时检索消息 ID。但是,我似乎仍然在处理文件夹的过程中出现异常:“响应中未找到单个 ID”。
有人知道如何发送带有附件的邮件并在 JavaScript (jQuery) 中显示进度条的好例子吗? 最佳答案 您可能需要猜测所需的时间并据此更新进度条。 Given that PHP doesn't
我正在对电子邮件进行分类以查找字符串的特定实例,但花费的时间太长了。我希望将每封电子邮件的时间缩短到半秒,目前每封电子邮件大约需要 2-2.5 秒。 我担心我正在做一些非常愚蠢的事情,这会减慢速度 -
如何使用 Zend_Mail (POP3) 获取邮件源(标题、正文、边界 - 全部作为纯文本)。 它默认返回解析的部分,我需要原始消息源。 最佳答案 Zend Mail 中没有这样的方法。 但是您可以
setFrom('user@example.com','Admin'); $mail->addTo($tosend, 'Some Recipient'); $mail->addCc($tocc); $
我正在使用 Zend 框架发送邮件。配置完成并编写代码后,所有这些都归结为一次调用: $Mail->send($Transport) 如何检查这封邮件是否已正确发送?我在某处读到 Zend Mail
(因为这是我的第一个 SO 问题,我只想说我希望它不是太特定于 Zend。据我所知这应该不是问题。虽然我可以将它发布在Zend 特定的论坛,我觉得我至少有可能在这里得到一个好的答案,特别是因为答案可能
我正在将这些库用于我正在构建的电子邮件应用程序。 $storage = new Zend_Mail_Storage_Imap($imap); if (strpos($storage->getMessa
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: Use Zend Framework components without the actual frame
使用 Zend_Mail 时添加附件的正确方法是什么?当我尝试打开已发送邮件中附加的 pdf 时,我不断收到以下错误消息:“无法提取嵌入字体‘BAAAAAA+ArialMT’。某些字符可能无法正确显示
我正在使用 Zend_Mail 并想自定义发件人姓名。 我希望发件人姓名为FooBar爱你Ryan(其中“Ryan”被替换为收件人姓名,爱你被替换为收件人语言中的“loves”翻译, just lik
我正在通过 Zend_Mail 创建一个包含动态内容的时事通讯,但是我想根据 W3C 验证生成的 HTML 代码,有没有办法让整个电子邮件代码被发送,以便我可以获取它进行验证? getBodyHtml
我正在使用 Zend Framework。 我需要为 Zend_Mail(使用 Zend_Application_Resource_Mail)在 application.ini 中放置多个邮件配置。是
我尝试编写有关使用 Zend Framework 发送电子邮件的代码。这是代码, $mail = new Zend_Mail('utf-8'); $mailConfig = array( 'auth'
我正在开发一个包含简单电子邮件功能的 zend 框架应用程序。开发版本在我的电脑上运行,它运行的是 Ubuntu。生产版本将在生产服务器上运行。 尝试向自己发送测试电子邮件时,我收到一条异常消息:“无
我是一名优秀的程序员,十分优秀!