📄 mail.php
字号:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$ip = $_SERVER['REMOTE_ADDR'];
// Set the email adress to recieve mails from this script
$to = 'youremail@yoursite.yourdomain';
// Set the subject of mails sent by this script
$subject = 'Form Mail submission!';
$content =
'
<p>A new form has been submitted in your website with this following information</p>
<p>
<b>Name: </b>'.$name.'<br>
<b>Email: </b>'.$email.'<br>
<b>IP: </b>'.$ip.'<br>
<b>Message: </b><br>'.$message.'
</p>
';
if(mail($to,$subject,$content))
{
echo 'status="Message Posted!"';
}
else
{
echo 'status="Failed to post!"';
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -