Drupal发邮件函数-drupal_mail_send()

.Sun, 12/12/2010 - 21:59

Drupal提供了一个非常方便的发邮件函数 drupal_mail_send($message)

实际应用的时候,主要是遇到了中文乱码的问题,最后通过 'Content-Type' => 'text/html; charset="utf-8";' 解决了。
但是 'From' => 'Company Name ' 这里的 Comapany Name 若是中文的话,还是出现乱码,不知如何解决,有知道的朋友请告知,谢谢!

<?php
$message = array(
  'id' => 'named_fund',
  'to' => $email,
  'subject' => '恭喜您成功创建了个人冠名基金!',
  'body' => '恭喜恭喜恭喜你呀恭喜恭喜恭喜你!!!!!!!!!',
  'headers' => array('From' => 'Company Name <example@example.com>', 'Content-Type' => 'text/html; charset="utf-8";'),
);

drupal_mail_send($message);
?>