(可带附件<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
代码如下 | 复制代码 |
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=gb2312" /> <title>php mail函数发送电子邮件(可带附件)</title> </head> <body> <form method = post action = "send_private_mail.php"><br> |
send_private_mail.php文件
代码如下 | 复制代码 |
<?php //create short variable names $from = $_post['from']; $title = $_post['title']; $body = $_post['body']; $to_email = 'luke@localhost'; // tell gpg where to find the key ring //write the user's text to the file //set up our command // execute our gpg command //delete the unencrypted temp file if($result==0) mail($to_email, $title, $contents, "from: $from "); if($result!=0) |
/*
*/
?>)