ユーザーのサブスクリプションが終了したときに送信される電子メール メッセージの本文にリンクを追加する必要があります。このリンクは、「ユーザー名」がサブスクリプションの更新を希望していることを示すメールをアドレスに送信する必要があります。あなたが私を理解しているなら、だから私はphp mail()の中でphp mail()をする必要があります! また、リンクをクリックすると、お礼のメッセージが表示されます。現在の「sendExpiryEmail」関数の PHP コードは次のとおりです。あなたが助けてくれることを願っています! ありがとう。
パブリック関数 sendExpiryEmail($emails){
foreach($emails as $email){
$name = $email['name'];
$emailaddress = $email['email'];
$expirydate = date('jS F Y',strtotime($email['datetime_expire']));
$subject = "AZ China Report expiry reminder";
$body = '<p><img src="http://az-china.com/images/azchina_logo_email.jpg"></p>
<p>Dear '.$name.',<br /><br />
We hope you have been enjoying your subscription to the Black China Report.<br /><br />
We aim to meet the needs of our readers, by de-mystifying the China market, and by providing accurate, current and pertinent facts and analysis.<br />
We have some exciting new initiatives planned in the coming months.<br /><br />
Your Black China Report subscription will expire on '.$expirydate.'.<br /><br />
<strong>Renewing your subscription is easy.</strong><br /><br />
Simply click here (link to mail()) and we will send you an order form and details on how to pay.<br /><br />
If we can be any further assistance, please do not hesitate to contact us! <br /><br />
Yours sincerely, <br /><br />
Tom Martin<br /><br />
AZ China</p>';
// multiple recipients
$to = $emailaddress;
//$to = 'c23gooey@gmail.com';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: AZ China <tom.martin@az-china.com>' . "\r\n";
// Mail it
mail($to, $subject, $body, $headers);
}
}