<?php
//-----------------Getting data sent by flash---------------------
foreach ($_POST as $key => $value){
if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){
$mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';
$mail_body .= ''.stripslashes($value).'<br/>';
}
}
//-----------------------------------------------------------------
$message = '<html><body>'.$mail_body.'</body></html>'; // mail body
//------------if plain text is set to true removing html tags------
if ($_POST['plain_text']=='true') {
$message = str_replace('<br/>',"\r\n", $message);
$message = strip_tags($message);
//------------------------------------------------------------------
} else {
//----otherwise composing message headers---------------------------
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//------------------------------------------------------------------
}
//------------setting conf data-------------------------------------
$to = $_POST['mail_to'];
$from = $_POST['mail_from'];
$subject = $_POST['mail_subject'];
$smtp_server = $_POST['smtp_server'];
$smtp_port = $_POST['smtp_port'];
//------------------------------------------------------------------
//---------setting header info--------------------------------------
$headers .= 'To: '.$to. "\r\n";
$headers .= 'From: Site visitor ' .$from. "\r\n";
//------------------------------------------------------------------
if (mail($to, $subject, $message, $headers)){ // sending mail
print('&mail=1'); //succes
} else {
print('&mail=0');//failure
}
?>
TM-0406_企业网站网页源码欧美前端模板.zip
需积分: 0 126 浏览量
2023-08-01
22:07:21
上传
评论
收藏 15.65MB ZIP 举报
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
qw_6918966011
- 粉丝: 23
- 资源: 6161
最新资源
- VMware vCenter Server 7.0U3r安装ISO的度盘地址,由Patch界面提供,产品界面仍然为7.0U3p
- python脚本-批量修改文件后缀
- VMware vCenter Server 8.0U2d安装ISO的度盘地址,由Patch界面提供,下载界面仍然为8.0U2c
- bge-reranker-base本地模型
- 前端学习笔记,做一个简单的网站-学生成绩.HTML
- go语言实现的简单搜索引擎demo,使用了redis,colly,gin-gonic等技术
- 基于时空图卷积(ST-GCN)的骨骼动作识别(python源码+毕业设计).zip
- JAVAEE开发+MyBatis+Spring+SpringMVC+个人博客管理系统+用于发布日志和博客
- 毕业设计 基于Python时空图卷积(ST-GCN)的骨骼动作识别源码+模型+示例效果图+全部数据资料(优秀项目).zip
- eNSP安装必备工具(包括eNSP、VirtualBox、WinPcap、Wireshark)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)