実際に私はPHPから電子メールを送信しています。外部ファイルから電子メール本文にfile_get_contents()を使用しているとき、返信していない電子メールIDです。代わりに、それは '[電子メールで保護された]'を返すメールIDです。ここでphpのfile_get_contentsがEメールのIDを返していないのはなぜですか?
)のfile_get_contentsでファイルを(呼び出すために私のコードです:
$params = 'for=team&name='.urlencode($name).'&email='.urlencode($email).'&phone='.urlencode($phone).'&company='.urlencode($company).'&looking_for='.$looking_for.'&country='.urlencode($country).'&source_page='.urlencode($source_page);
$team_msg = file_get_contents(get_template_directory_uri().'/mail-template/contact_us_email_temp.php?'.$params);
$headers[] = "MIME-Version: 1.0" . "\r\n";
$headers[] .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers[] .= 'From: Someone <[email protected]>';
$to = '[email protected]';
$team_subject = 'email subject';
wp_mail($to, $team_subject, $team_msg, $headers);
、ここでは、関数から呼び出された 'contact_us_email_temp.php' です:
$message = "<table border='0'><tbody>
<tr><td colspan='2'>Users Detail:</td></tr>
<tr>
<td><b>Name</b></td>
<td>".$_GET['name']."</td>
</tr>
<tr>
<td><b>Official Email</b></td>
<td>".$_GET['email']."</td>
</tr>
<tr>
<td><b>Company</b></td>
<td>".$_GET['company']."</td>
</tr>
<tr>
<td><b>Mobile Number</b></td>
<td>".$_GET['phone']."</td>
</tr>
<tr>
<td><b>Looking For</b></td>
<td>".$_GET['looking_for']."</td>
</tr>
<tr>
<td><b>Country</b></td>
<td>".$_GET['country']."</td>
</tr>
<tr>
<td><b>Source Page</b></td>
<td>".$_GET['source_page']."</td></tr>
<tr>
</tbody>
</table>";
echo $message;
私はわかりません関数の何が問題なのですか?
おかげ
グレートの機能を実行します!!このソリューションは魅力的に機能しました... –