Add: send mail test

This commit is contained in:
2018-09-18 14:48:05 +09:00
parent ba5336795a
commit 697265ee29
5 changed files with 195 additions and 10 deletions
@@ -0,0 +1,44 @@
<?php
function get_max_player_count($accountType) {
switch($accountType) {
case 0:
case 1:
case 100:
case 101:
return 20;
case 2:
return 50;
case 3:
return 100;
case 4:
return 500;
case 5:
return 1000;
}
return 0;
}
function get_price($accountType) {
switch($accountType) {
case 1:
return "10,000";
case 2:
return "20,000";
case 3:
return "30,000";
case 4:
return "40,000";
case 5:
return "50,000";
}
return 0;
}
?>
+11
View File
@@ -0,0 +1,11 @@
<?php
$newLine = "\r\n";
// load service db setting
$bankName = "카카오뱅크";
$bankOwnerName = "박지상";
$bankAccountNo = "3333-04-4316912";
?>
+87
View File
@@ -0,0 +1,87 @@
<?php
header("Content-Type: application/json");
include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";
include "./../lib/maestro_account_info.php";
include "./mail_setting.php";
// $maestroID = $_POST["maestro_id"];
// $maestroName = $_POST["maestro_name"];
// $email = $_POST["email"];
// $accountType = $_POST["account_type"];
// $upgradeAccountType = $_POST["upgrade_account_type"];
$maestroID = 3;
$maestroName = "삼화초";
$email = "jisangs@daum.net";
$accountType = 1;
$upgradeAccountType = 2;
header("Content-Type: text/html; charset=UTF-8");
// from
$from = "support+chocomae@jinaju.com";
// to, bcc
$to = $email; // "jisangs@daum.net";
$bcc = "support+chocomae.automail@jinaju.com";
// subject
$subject = subjectInfoBankAccountForRegisteringMaestro($maestroName);
// $subject = "=?UTF-8?B?".base64_encode($subject)."?=";
// message
$message = messageInfoBankAccountForRegisteringMaestro($maestroName, $accountType);
// header
$header = "From:".$from.$newLine."BCC:".$bcc;
mb_send_mail($to, $subject, $message, $header);
header("Content-Type: application/json");
send_result_success();
exit;
// 마에스트로 계정 신청 - 입금 안내
function subjectInfoBankAccountForRegisteringMaestro($maestroName) {
return "[초코마에] 마에스트로 계정 (".$maestroName.") 등록을 위한 입금 안내";
};
function messageInfoBankAccountForRegisteringMaestro($maestroName, $accountType) {
global $newLine, $bankName, $bankAccountNo, $bankOwnerName;
return "안녕하세요.".$newLine."[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.".$newLine
.$newLine
."※ 지금 보고 계신 메일이 [스팸 메일함]에 들어있다면, [스팸 해제]를 부탁드립니다 ※".$newLine
."(이후에 [계정 등록 알림], [계정 유효기간 종료 예고] 등의 메일이 발송됩니다)".$newLine
.$newLine
.$newLine
."[".$maestroName."] 마에스트로 계정을 활성화 하기 위한 은행 계좌 정보는 아래와 같습니다.".$newLine
."------------------------------------------------------------".$newLine
." * 은행 계좌 : ".$bankAccountNo." ( ".$bankName." )".$newLine
." * 예금주명 : ".$bankOwnerName.$newLine
." * 금액 : ".get_price($accountType)."".$newLine
.$newLine
." * 송금자명 : ".$maestroName." (신청하신 마에스트로 아이디)".$newLine
." ☞ 빠른 입금 확인을 위해, 송금자명을 본인 이름 대신 위와 같이 아이디로 부탁드립니다 ☜".$newLine
."------------------------------------------------------------".$newLine
.$newLine
."* 계정이 활성화되면 1년동안 사용하실 수 있습니다.".$newLine
."* 연장 결제를 해주시면, 남은 기간에 1년이 추가됩니다.".$newLine
."* 상위 요금제로 업그레이드 하셔도, 현재 계정의 남은 기간에 1년이 추가됩니다.".$newLine
."* 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.".$newLine
.$newLine
.$newLine
."계정 신청 내역과 입금 내역이 확인되는대로 마에스트로 아이디를 활성화 해드리겠습니다.".$newLine
."현재 수작업으로 확인하고 활성화하고 있어서 시간이 조금 걸리는 점 양해 부탁드립니다.".$newLine
."마에스트로 계정이 활성화되는대로, 즉시 알림 메일을 드리겠습니다.".$newLine
.$newLine
."감사합니다.".$newLine;
}
?>