html发送邮件到默认邮箱,html mailto不发送电子邮件

It Assistors..

6

这mailto:不是用于发送电子邮件,而是创建一个邮件,其中包含指定的收件人电子邮件mailto:receiver@abc.com.

例如:如果您使用的是Windows PC,并且如果您使用Outlook作为默认电子邮件软件,那么单击将在to字段中使用xyz@gmail.com打开Outlook .

如果要发送电子邮件,可以使用PHP邮件功能来执行此操作.

在表单操作而不是mail to function中添加您创建的PHP脚本文件并遵循此代码结构.

HTML:

Receiver Email :

your_php.php脚本:

$to = $_POST['to'];

//Getting the 'to' textbox data from the form

/* If you are using GET method ,then use $_GET[] */

$subject = "Your Mail Subject" ;

$message = "Your message to be sent" ;

$headers = "From: yourmailid@domain.com" ;

// If you leave the $headers from field empty,then your server mail ID will be displayed

and it may be moved to the spam section of the email

mail($to,$subject,$message,$headers);

/* Done , Your mail will be sent to the email address you want

?>

这会将邮件发送到所需的电子邮件地址.

PS PHP是一种服务器端脚本语言,所以除非你的网页和php脚本有托管服务器,否则你不能发送邮件.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值