';
}
if(trim($_POST['birth']) == ''){
$error .= '生年月日を入力してください。
';
}
if(trim($_POST['tel']) == ''){
$error .= '連絡先を入力してください。
';
}
if(trim($_POST['email']) == ''){
$error .= 'メールアドレスを入力してください。
';
}
if(!$error){
$subject = '女性面談(仮)'.$name;
$message .= 'WEBからの応募がありました。' . "\n";
$message .= <<< EOF
名前= {$name}
誕生日= {$birth}
連絡先= {$tel}
email= {$email}
相談内容 =
{$text}
★http://webmail.xserver.jp
EOF;
// PEARのメール関数を使用
$recipients = $_POST['email'];
$recipients_you = 'bell24@luna-cuty.com';
// 言語設定、内部エンコーディングを指定する
mb_language("Japanese");
mb_internal_encoding("UTF-8");
$params['sendmail_path'] = '/usr/sbin/sendmail';
$mailObject = Mail::factory('sendmail', $params);
$body = mb_convert_encoding($message,"JIS","UTF-8");
$mime = new Mail_Mime("\n");
$mime->setTxtBody($body);
$headers = array(
"To" => $recipients_you,
"From" => mb_encode_mimeheader($subject)."<".$recipients.">",
"Reply-To" => $recipients,
"Subject" => mb_encode_mimeheader($subject)
);
$header = $mime->headers($headers);
$mailObject -> send($recipients_you,$header,$body);
//ここから応募者へメール
$message = '';
$subject = '';
$check_mail_sql = "select * from woman_shomei where woman_shomei_id = 16";
$auction_check_mall_query = tep_db_query($check_mail_sql);
if (tep_db_num_rows($auction_check_mall_query) > 0) {
while($auction_offer = tep_db_fetch_array($auction_check_mall_query)){
$message = mb_convert_encoding($auction_offer['woman_shomei_info'],"UTF-8", "EUC-JP");
$subject = mb_convert_encoding($auction_offer['subject'],"UTF-8", "EUC-JP");
}
}
// PEARのメール関数を使用
$recipients = 'mail@luna-cuty.com';
$recipients_you = $_POST['email'];
// 言語設定、内部エンコーディングを指定する
mb_language("Japanese");
mb_internal_encoding("UTF-8");
$params['sendmail_path'] = '/usr/sbin/sendmail';
$mailObject = Mail::factory('sendmail', $params);
$body = mb_convert_encoding($message,"JIS","UTF-8");
$mime = new Mail_Mime("\n");
$mime->setTxtBody($body);
$headers = array(
"To" => $recipients_you,
"From" => mb_encode_mimeheader('ルナカティ東京')."<".$recipients.">",
"Reply-To" => $recipients,
"Subject" => mb_encode_mimeheader($subject)
);
$header = $mime->headers($headers);
$mailObject -> send($recipients_you,$header,$body);
header("location:mail_after.html");
exit;
}
}
?>