为了使右键函数正常运行,php 必须在编译时访问你系统里的 sendmail 可执行文件。 如果你使用了其他邮件程序,例如 qmail 或者 postfix,请确保它们使用了与 sendmail 适配的包装器。 php 首先会在你的 path 变量里查找 sendmail,然后在下面的路径里查找:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib。 强烈建议 sendmail 在您的 path 变量里。并且,运行编译后php程序的用户也必须有执行 sendmail 的权限。
相关函数:
ezmlm_hash — 计算 ezmlm 所需的散列值
mail — 发送邮件
使用示例:
<?php $name = "da duder"; //senders name $email = "email@adress.com"; //senders e-mail adress $recipient = "personwhogetsit@emailadress.com"; //recipient $mail_body = "the text for the mail..."; //mail body $subject = "subject for reviever"; //subject $header = "from: ". $name . " <" . $email . ">\r\n"; //optional headerfields mail($recipient, $subject, $mail_body, $header); //mail command ?>