在我的HTML表单中,用户请求loanform.pdf链接...在点击链接时,它通过用户邮件ID发送pdf表单后询问用户电子邮件ID .........如何解决这个问题有人给出一些建议或例子吗?
答案 0 :(得分:1)
$email = new PHPMailer();
$email->From = 'you@example.com';
$email->FromName = 'Your Name';
$email->Subject = 'Message Subject';
$email->Body = $bodytext;
$email->AddAddress( 'destinationaddress@example.com' );
$file_to_attach = 'PATH_OF_YOUR_FILE_HERE';
$email->AddAttachment( $file_to_attach , 'NameOfFile.pdf' );
return $email->Send();
从此处下载PHPMailer脚本:http://github.com/PHPMailer/PHPMailer