简体   繁体   中英

script sending many emails

I want to send the content of a page to my email... so i am trying this code

<?php

$to  = 'hatim.makki@gmail.com';
$subject = 'JYBExpo Report';

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";

$message = file_get_contents('http://jybexpo.com/cms/?page_id=53&print=1');

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

?>

but this code sent me more than 20 emails

how to make it send only one email? can any one help me?

之所以发送多封电子邮件,是因为您的模板被多次调用,每次调用模板时,邮件脚本都会启动并向您发送新的电子邮件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM