From 8195402979df0ab90a7fa91b5deef2a3b0b9fe27 Mon Sep 17 00:00:00 2001 From: "jisangs (iMac)" Date: Sun, 1 May 2022 17:27:54 +0900 Subject: [PATCH] Fix: send_mail -> send_naver_mail --- src/web/server/admin/extension_maestro.php | 3 +- src/web/server/admin/register_maestro.php | 3 +- src/web/server/admin/upgrade_maestro.php | 3 +- src/web/server/maestro/add_maestro.php | 4 +- .../maestro/request_extension_maestro.php | 3 +- .../maestro/request_upgrade_maestro.php | 3 +- .../server/maestro/update_maestro_info.php | 5 +- src/web/server/mail/mail_contents.php | 272 ++++++++++++++++++ src/web/server/mail/send_mail_test.php | 3 +- src/web/server/mail/send_naver_mail.php | 83 ++++++ 10 files changed, 372 insertions(+), 10 deletions(-) create mode 100644 src/web/server/mail/mail_contents.php diff --git a/src/web/server/admin/extension_maestro.php b/src/web/server/admin/extension_maestro.php index f8bceaa..dded495 100644 --- a/src/web/server/admin/extension_maestro.php +++ b/src/web/server/admin/extension_maestro.php @@ -8,6 +8,7 @@ include "./../lib/maestro_log.php"; include "./../lib/maestro_account_info.php"; include "./../mail/mail_setting.php"; // include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestro_extension_id = $_POST["maestro_extension_id"]; $maestro_id = $_POST["maestro_id"]; @@ -22,7 +23,7 @@ change_extension_request_status_to_applied($maestro_extension_id); $maestro_data = get_maestro_data($maestro_id); // $maestro_name, $new_available_date, $maestro_email -// sendMailExtensionDone($maestro_data["name"], $new_available_date, $maestro_data["email"]); +sendMailExtensionDone($maestro_data["name"], $new_available_date, $maestro_data["email"]); insertMaestroLog("extension_maestro", $maestro_id, $maestro_name."(".$registered_account_type.")"); // set_data("maestro_extension_id", $maestro_extension_id); diff --git a/src/web/server/admin/register_maestro.php b/src/web/server/admin/register_maestro.php index 21bffc6..9c17fe0 100644 --- a/src/web/server/admin/register_maestro.php +++ b/src/web/server/admin/register_maestro.php @@ -8,6 +8,7 @@ include "./../lib/db_maestro.php"; include "./../lib/maestro_log.php"; include "./../mail/mail_setting.php"; // include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestroID = $_POST["maestro_id"]; @@ -41,7 +42,7 @@ $count = count_registered_player($maestroID); update_count_registered_player($maestroID, $count); $maestro_data = get_maestro_data($maestroID); -// sendMailRegisterDone($maestro_data["name"], $maestro_data["email"]); +sendMailRegisterDone($maestro_data["name"], $maestro_data["email"]); insertMaestroLog("register_maestro", $maestroID, $maestro_data["name"]." / ".$maestro_data["email"]); send_result_success(); diff --git a/src/web/server/admin/upgrade_maestro.php b/src/web/server/admin/upgrade_maestro.php index 5bf630e..3064b58 100644 --- a/src/web/server/admin/upgrade_maestro.php +++ b/src/web/server/admin/upgrade_maestro.php @@ -8,6 +8,7 @@ include "./../lib/maestro_log.php"; include "./../lib/maestro_account_info.php"; include "./../mail/mail_setting.php"; // include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestro_upgrade_id = $_POST["maestro_upgrade_id"]; $maestro_id = $_POST["maestro_id"]; @@ -20,7 +21,7 @@ change_upgrade_request_status_to_close($maestro_id); change_upgrade_request_status_to_applied($maestro_upgrade_id); $maestro_data = get_maestro_data($maestro_id); -// sendMailUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type); +sendMailUpgradeDone($maestro_data["name"], $maestro_data["email"], $registered_account_type, $upgrade_account_type); insertMaestroLog("upgrade_maestro", $maestro_id, $registered_account_type." -> ".$upgrade_account_type); // set_data("maestro_upgrade_id", $maestro_upgrade_id); diff --git a/src/web/server/maestro/add_maestro.php b/src/web/server/maestro/add_maestro.php index b86d66d..3739c6f 100644 --- a/src/web/server/maestro/add_maestro.php +++ b/src/web/server/maestro/add_maestro.php @@ -7,7 +7,7 @@ include "./../lib/maestro_account_info.php"; include "./../lib/db_maestro.php"; include "./../lib/maestro_log.php"; include "./../mail/mail_setting.php"; -// include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestro_name = $_POST["maestro_name"]; @@ -32,7 +32,7 @@ if($maestroID === null) { exit; } -// sendMailRegisterBankInfo($maestro_name, $email, $account_type); +sendMailRegisterBankInfo($maestro_name, $email, $account_type); insertMaestroLog("add_maestro", $maestroID, $maestro_name." / ".$email." / ".$account_type); send_result_success(); diff --git a/src/web/server/maestro/request_extension_maestro.php b/src/web/server/maestro/request_extension_maestro.php index 0bee2c5..39eea83 100644 --- a/src/web/server/maestro/request_extension_maestro.php +++ b/src/web/server/maestro/request_extension_maestro.php @@ -7,6 +7,7 @@ include "./../lib/db_maestro.php"; include "./../lib/maestro_account_info.php"; include "./../mail/mail_setting.php"; // include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestro_id = $_POST["maestro_id"]; $available_date = $_POST["available_date"]; @@ -35,7 +36,7 @@ if($countUpgrade === null || $countUpgrade < 1) { $maestro_data = get_maestro_data($maestro_id); // $maestro_name, $available_date, $new_available_date, $maestro_email, $registered_account_type -// sendMailExtensionBankInfo($maestro_data["name"], $available_date, $new_available_date, $maestro_data["email"], $account_type); +sendMailExtensionBankInfo($maestro_data["name"], $available_date, $new_available_date, $maestro_data["email"], $account_type); send_result_success(); exit; diff --git a/src/web/server/maestro/request_upgrade_maestro.php b/src/web/server/maestro/request_upgrade_maestro.php index b3cf367..d528fe4 100644 --- a/src/web/server/maestro/request_upgrade_maestro.php +++ b/src/web/server/maestro/request_upgrade_maestro.php @@ -7,6 +7,7 @@ include "./../lib/db_maestro.php"; include "./../lib/maestro_account_info.php"; include "./../mail/mail_setting.php"; // include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestro_id = $_POST["maestro_id"]; $registered_acount_type = $_POST["registered_account_type"]; @@ -33,7 +34,7 @@ if($countUpgrade === null || $countUpgrade < 1) { } $maestro_data = get_maestro_data($maestro_id); -// sendMailUpgradeBankInfo($maestro_data["name"], $maestro_data["email"], $registered_acount_type, $upgrade_account_type); +sendMailUpgradeBankInfo($maestro_data["name"], $maestro_data["email"], $registered_acount_type, $upgrade_account_type); send_result_success(); exit; diff --git a/src/web/server/maestro/update_maestro_info.php b/src/web/server/maestro/update_maestro_info.php index a62bf2c..acda5d5 100644 --- a/src/web/server/maestro/update_maestro_info.php +++ b/src/web/server/maestro/update_maestro_info.php @@ -8,6 +8,7 @@ include "./../lib/db_maestro.php"; include "./../lib/maestro_log.php"; include "./../mail/mail_setting.php"; // include "./../mail/send_mail.php"; +include "./../mail/send_naver_mail.php"; $maestroID = $_POST["maestro_id"]; $maestroName = $_POST["maestro_name"]; @@ -28,12 +29,12 @@ update_maestro_info($maestroID, $maestroName, $email); if($maestroName != $maestro_name_prev) { - // sendMailUpdateMaestroName($maestroName, $maestro_name_prev, $email); + sendMailUpdateMaestroName($maestroName, $maestro_name_prev, $email); insertMaestroLog("update_maestro_name", $maestroID, $maestro_name_prev." -> ".$maestroName); } if($email != $email_prev) { - // sendMailUpdateMaestroEmail($maestroName, $email, $email_prev); + sendMailUpdateMaestroEmail($maestroName, $email, $email_prev); insertMaestroLog("update_maestro_email", $maestroID, $email_prev." -> ".$email); } diff --git a/src/web/server/mail/mail_contents.php b/src/web/server/mail/mail_contents.php new file mode 100644 index 0000000..eaa3448 --- /dev/null +++ b/src/web/server/mail/mail_contents.php @@ -0,0 +1,272 @@ +". +"[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.
". +"
". +"신청하신 마에스트로 계정 내용은 아래와 같습니다.
". +"1) 아이디 : {{maestro_name}}
". +"2) 요금제 : {{student_count}}명 ({{price}}만원)
". +"
". +"계정 등록을 위한 은행 계좌 입금 정보는 아래와 같습니다.
". +"------------------------------------------------------------
". +"* 은행 계좌 : {{bank_account_no}} ( 카카오뱅크, 예금주 : 박지상 )
". +"* 금액 : {{price}}만원
". +"* 송금자명 : {{maestro_name}} (신청하신 마에스트로 아이디)
". +" ☞ 빠른 입금 확인을 위해, 송금자명을 본인 이름 대신 위와 같이 아이디로 부탁드립니다 ☜
". +"------------------------------------------------------------
". +"
". +"* 혹시 신청하신 아이디가 아니라 본인 이름등으로 송금되었다면, 송금자명을 본 메일로 답신 부탁드립니다.
". +"
". +"* 계정이 활성화되면 1년동안 사용하실 수 있습니다.
". +"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 다시 채워집니다.
". +"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.
". +"
". +"
". +"계정 신청 내역과 입금 내역이 확인되는대로 마에스트로 아이디를 활성화 해드리겠습니다.
". +"현재 수작업으로 확인하고 활성화하고 있어서 시간이 조금 걸리는 점 양해 부탁드립니다.
". +"마에스트로 계정이 활성화되는대로, 즉시 알림 메일을 드리겠습니다.
". +"
". +"감사합니다."; + +$subjectMap['registrationDone'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 등록 및 활성화 완료"; +$bodyMap['registrationDone'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.
". +"
". +"{{maestro_name}} - 마에스트로 계정이 활성화 되었습니다.
". +"
". +"* 계정이 활성화되면 1년동안 사용하실 수 있습니다.
". +"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 다시 채워집니다.
". +"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.
". +"
". +"* 아래 URL을 사용하면, 마에스트로 이름이 입력된 로그인 화면이 실행됩니다.
". +"http://chocomae.jinaju.com/login/{{maestro_name}}
". +"
". +"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.
". +"(변경 가능 정보 : 마에스트로 아이디, 이메일, 암호)
". +"
". +"감사합니다."; + +$subjectMap['registrationUnpaid'] = "[초코마에] {{maestro_name}} - 미입금 계정 삭제 예고 안내"; +$bodyMap['registrationUnpaid'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.
". +"
". +"{{date}}에 {{maestro_name}} 계정을 신청해 주셨는데, 일주일간 입금 내역이 확인되지 않았습니다.
". +"오늘중으로 입금 내역이 없으면 등록하신 계정 등록 정보를 삭제할 예정입니다.
". +"(혹시 입금하셨었다면, 입금 날짜와 입금자명을 알려주세요. 다시 한 번 확인해보도록 하겠습니다!)
". +"
". +"악의적으로 다량의 마에스트로 아이디를 선점하는 어뷰징을 방지하기 위해, 입금 내역이 없으면 신청 내역을 삭제하고 있습니다.
". +"양해 부탁드립니다.
". +"
". +"* 기존 신청 내역이 삭제되더라도 동일한 아이디로 다시 신청하실 수 있습니다.
". +"* 학생 무료 체험 계정으로도 일부 마우스와 타자 연습 앱 사용이 가능합니다. 부담 없이 많이 사용해 주세요.
". +"
". +"감사합니다."; + + + +// registration - closed beta +$subjectMap['closedBetaRegistrationBankInfo'] = "[초코마에] {{maestro_name}} 마에스트로 계정 등록을 위한 입금 안내"; +$bodyMap['closedBetaRegistrationBankInfo'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.
". +"
". +"신청하신 마에스트로 계정 내용은 아래와 같습니다.
". +"1) 아이디 : {{maestro_name}}
". +"2) 요금제 : {{student_count}}명 ({{price}}만원)
". +"
". +"계정 신청 내역이 확인되는대로 마에스트로 아이디를 활성화 해드리겠습니다.
". +"현재 수작업으로 확인하고 활성화하고 있어서 시간이 조금 걸리는 점 양해 부탁드립니다.
". +"마에스트로 계정이 활성화되는대로, 즉시 알림 메일을 드리겠습니다.
". +"
". +"7월 말까지 무료로 사용하세요. 마음에 들면 유료 정식 서비스때 결제 부탁드릴게요.
". +"
". +"감사합니다."; + +$subjectMap['closedBetaRegistrationDone'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 등록 및 활성화 완료"; +$bodyMap['closedBetaRegistrationDone'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정을 신청해 주셔서 감사합니다.
". +"
". +"{{maestro_name}} - 마에스트로 계정이 활성화 되었습니다.
". +"
". +"* 베타 기간인 7월 말까지 무료로 사용하실 수 있습니다. 마음에 들면 유료 정식 서비스때 결제 부탁드릴게요.
". +"* 베타 기간동안 서버 부하와 안정성을 확인합니다. 문제가 없으면 이후 유료로 정식 서비스를 재개할 예정입니다.
". +"* 계정 업그레이드는 베타 기간 이후에 가능합니다.
". +"
". +"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.
". +"(변경 가능 정보 : 마에스트로 아이디, 이메일, 암호)
". +"
". +"감사합니다."; + + + +// extension +$subjectMap['extensionBankInfo'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 유효기간 연장을 위한 입금 안내"; +$bodyMap['extensionBankInfo'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정 유효기간 연장을 신청해주셔서 감사합니다.
". +"
". +"{{maestro_name}} - 마에스트로 계정의 현재 요금제와 유효기간은 아래와 같습니다.
". +"1) 현재 사용중인 요금제 : {{student_count}}명 ({{price}}만원)
". +"2) 유효기간 : {{date}}
". +"
". +"연장을 신청하실 경우, 새로운 유효기간은 아래와 같습니다.
". +"3) 새로운 유효기간 : 2020-11-04
". +"
". +"계정 유효기간 연장을 위한 은행 계좌 입금 정보는 아래와 같습니다.
". +"------------------------------------------------------------
". +"* 은행 계좌 : {{bank_account_no}} ( 카카오뱅크, 예금주 : 박지상 )
". +"* 금액 : {{price}}만원
". +"* 송금자명 : {{maestro_name}} (신청하신 마에스트로 아이디)
". +" ☞ 빠른 입금 확인을 위해, 송금자명을 본인 이름 대신 위와 같이 아이디로 부탁드립니다 ☜
". +"------------------------------------------------------------
". +"
". +"* 혹시 신청하신 아이디가 아니라 본인 이름등으로 송금되었다면, 송금자명을 본 메일로 답신 부탁드립니다.
". +"* 계정 유효기간 연장 대신에 상위 요금제로 업그레이드를 하셔도 됩니다. 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 다시 채워집니다.
". +"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.
". +"
". +"연장 신청 내역에 대한 입금이 확인되는대로 유효기간 연장 작업을 처리하겠습니다.
". +"현재 수작업으로 확인하고 활성화하고 있어서 시간이 조금 걸리는 점 양해 부탁드립니다.
". +"유효기간 연장 작업을 마치면, 다시 한 번 알림 메일을 드리겠습니다.
". +"
". +"감사합니다."; + +$subjectMap['extensionDone'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 유효기간 연장 완료"; +$bodyMap['extensionDone'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정의 유효기간 연장을 신청해 주셔서 감사합니다.
". +"
". +"{{maestro_name}} - 마에스트로 계정의 유효기간이 +1년 연장되었습니다.
". +"* 새로운 유효기간 : {{date}}
". +"
". +"* 상위 요금제로 업그레이드 하시면, 유효기간이 업그레이드한 날짜로부터 1년으로 갱신됩니다.
". +"* 유효기간이 끝나면, 비활성화된 계정과 그 안에 있는 모든 정보가 6개월 후에 자동 삭제됩니다.
". +"
". +"감사합니다."; + + + +// upgrade +$subjectMap['upgradeBankInfo'] = "[초코마에] {{maestro_name}} - 마에스트로 계정 업그레이드를 위한 입금 안내"; +$bodyMap['upgradeBankInfo'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정 요금제 업그레이드를 신청해주셔서 감사합니다.
". +"
". +"{{maestro_name}} - 마에스트로 계정의 현재 요금제와 업그레이드 요금제는 아래와 같습니다.
". +"1) 현재 사용중인 요금제 : {{prev_student_count}}명 ({{prev_price}}만원)
". +"2) 신청하신 업그레이드 요금제 : {{upgrade_student_count}}명 ({{upgrade_price}}만원)
". +"
". +"
". +"계정 요금제 업그레이드를 위한 은행 계좌 입금 정보는 아래와 같습니다.
". +"------------------------------------------------------------
". +"* 은행 계좌 : {{bank_account_no}} ( 카카오뱅크, 예금주 : 박지상 )
". +"* 금액 : {{price}}만원
". +"* 송금자명 : {{maestro_name}} (신청하신 마에스트로 아이디)
". +" ☞ 빠른 입금 확인을 위해, 송금자명을 본인 이름 대신 위와 같이 아이디로 부탁드립니다 ☜
". +"------------------------------------------------------------
". +"
". +"* 혹시 신청하신 아이디가 아니라 본인 이름등으로 송금되었다면, 송금자명을 본 메일로 답신 부탁드립니다.
". +"
". +"* 상위 요금제로 업그레이드 하시면, 유효기간은 업그레이드가 적용된 날짜로부터 1년으로 다시 채워집니다.
". +"* 유효기간이 끝나서 비활성화된 계정과 그 안에 있는 모든 정보는, 6개월 후에 자동 삭제됩니다.
". +"
". +"
". +"계정 신청 내역과 입금 내역이 확인되는대로 마에스트로 아이디를 업그레이드 해드리겠습니다.
". +"현재 수작업으로 확인하고 활성화하고 있어서 시간이 조금 걸리는 점 양해 부탁드립니다.
". +"마에스트로 계정이 업그레이드 되는대로, 즉시 알림 메일을 드리겠습니다.
". +"
". +"감사합니다."; + +$subjectMap['upgradeDone'] = "[초코마에] {{maestro_name}} - 마에스트로 계정의 요금제 업그레이드 완료 알림"; +$bodyMap['upgradeDone'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정 요금제 업그레이드를 신청해주셔서 감사합니다.
". +"
". +"{{maestro_name}} - 마에스트로 계정의 요금제가 [ 50명 (2만원) ] 에서 [ 500명 (4만원) ] 로 업그레이드 되었습니다.
". +"
". +"* 마에스트로 계정 유효기간이 오늘부터 1년으로 다시 채워졌습니다.
". +"
". +"
". +"등록하신 마에스트로 계정 정보는 마에스트로 로그인 후, [계정 정보 수정] 화면에서 변경이 가능합니다.
". +"(변경 가능 정보 : 마에스트로 아이디, 이메일, 암호)
". +"
". +"감사합니다."; + + + +// update +$subjectMap['updateMaestroName'] = "[초코마에] {{update_maestro_name}} - 마에스트로 계정 아이디 정보 변경 알림"; +$bodyMap['updateMaestroName'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정의 아이디 정보가 변경되었습니다.
". +"
". +"마에스트로 아이디
". +"* 변경전 : {{prev_maestro_name}}
". +"* 변경후 : {{update_maestro_name}}
". +"
". +"마에스트로 로그인 하실 때, 변경된 아이디를 입력해 주세요.
". +"
". +"감사합니다."; + +$subjectMap['updateMaestroEmail'] = "[초코마에] 마에스트로 계정 이메일 정보 변경 알림"; +$bodyMap['updateMaestroEmail'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정의 이메일 정보가 변경되었습니다.
". +"
". +"마에스트로 이메일
". +"* 변경전 : {{prev_email}}
". +"* 변경후 : {{update_email}}
". +"
". +"앞으로의 초코마에 알림은 변경후 이메일로 보내지게 됩니다.
". +"
". +"감사합니다."; + + + + + +// expiration +$subjectMap['expiration7days'] = "[초코마에] 타자나라 마에스트로 계정 유효기간 - 7일 후 만료 안내"; +$bodyMap['expiration7days'] = "안녕하세요.
". +"[초코마에] 마에스트로 계정을 이용해 주셔서 감사합니다.
". +"
". +"현재 이용중이신 마에스트로 계정의 유효기간이 7일밖에 남지 않았습니다.
". +"* 유효기간 : ~ {{date}}
". +"
". +"7일 후에는 휴면 계정으로 전환되고, 학생들이 초코마에 서비스에 로그인하지 못하게 됩니다.
". +"초코마에 서비스를 계속 사용하기를 희망하신다면 잊지 말고 서비스 연장을 신청해 주세요.
". +"
". +"아래에 준비된 여러가지 방법 중 하나를 골라, 유효기간을 연장하실 수 있습니다.
". +"
". +"1) 마에스트로 관리 화면에서 [유효기간 연장] 버튼을 클릭
". +": 현재 사용중이신 요금제를 유지하며, 남은 기간에 +1년을 추가로 사용하실 수 있습니다.
". +"
". +"2) 마에스트로 관리 화면에서 [업그레이드] 버튼을 클릭
". +": 좀 더 많은 학생수로 업그레이드하고, 업그레이드한 날짜로부터 +1년을 추가로 사용하실 수 있습니다.
". +"
". +"감사합니다."; + +$subjectMap['expiration30days'] = "[초코마에] 컴퓨터교실 마에스트로 계정 유효기간 - 30일 후 만료 예고 및 연장 안내"; +$bodyMap['expiration30days'] = "안녕하세요.
". +"
". +"[초코마에] 마에스트로 계정을 이용해 주셔서 감사합니다.
". +"
". +"
". +"현재 이용중이신 마에스트로 계정의 유효기간이 30일밖에 남지 않았습니다.
". +"* 유효 기간 : ~ {{date}}
". +"
". +"아래에 준비된 여러가지 방법 중 하나를 골라, 유효기간을 연장하실 수 있습니다.
". +"
". +"1) 마에스트로 관리 화면에서 [유효기간 연장] 버튼을 클릭
". +": 현재 사용중이신 요금제를 유지하며, 남은 기간에 +1년을 추가로 사용하실 수 있습니다.
". +"
". +"2) 마에스트로 관리 화면에서 [업그레이드] 버튼을 클릭
". +": 좀 더 많은 학생수로 업그레이드하고, 업그레이드한 날짜로부터 +1년을 추가로 사용하실 수 있습니다.
". +"
". +"
". +"만약 연장, 업데이트하지 않고 유효기간이 만료되면 휴면 계정으로 전환됩니다.
". +"학생 계정의 로그인이 안되고 서비스를 사용하실 수 없게 되는데요. 계정 정보 및 학생 정보는 6개월가량 유지됩니다.
". +"
". +"남은 기간동안 연장 신청 여부를 생각해봐주세요.
". +"그리고 연장 신청을 원하신다면 기한 안에 꼭 신청 부탁드릴게요.
". +"
". +"감사합니다."; + + +?> \ No newline at end of file diff --git a/src/web/server/mail/send_mail_test.php b/src/web/server/mail/send_mail_test.php index d9343e6..cc70f64 100644 --- a/src/web/server/mail/send_mail_test.php +++ b/src/web/server/mail/send_mail_test.php @@ -6,7 +6,8 @@ include "./../lib/send_reply_json.php"; include "./../lib/maestro_account_info.php"; include "./../lib/db_maestro.php"; include "./mail_setting.php"; -include "./send_mail.php"; +// include "./send_mail.php"; +include "./send_naver_mail.php"; $type = $_POST["type"]; $maestro_id = $_POST["maestro_id"]; diff --git a/src/web/server/mail/send_naver_mail.php b/src/web/server/mail/send_naver_mail.php index 9550eed..b637651 100644 --- a/src/web/server/mail/send_naver_mail.php +++ b/src/web/server/mail/send_naver_mail.php @@ -7,6 +7,89 @@ use PHPMailer\PHPMailer\Exception; require './../PHPMailer/src/Exception.php'; require './../PHPMailer/src/PHPMailer.php'; require './../PHPMailer/src/SMTP.php'; +require './mail_contents.php'; +require './../lib/maestro_account_info.php'; + + + +// Register +function sendMailRegisterBankInfo($maestro_name, $maestro_email, $account_type) { + global $subjectMap, $bodyMap; + + // closed beta + $subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['closedBetaRegistrationBankInfo']); + + $body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['closedBetaRegistrationBankInfo']); + $body = str_replace("{{student_count}}", get_max_player_count($account_type), $body); + $body = str_replace("{{price}}", get_price($account_type), $body); + + send_naver_mail($maestro_email, $maestro_name, $subject, $body); +} + +function sendMailRegisterDone($maestro_name, $maestro_email) { + global $subjectMap, $bodyMap; + + // closed beta + $subject = str_replace("{{maestro_name}}", $maestro_name, $subjectMap['closedBetaRegistrationDone']); + + $body = str_replace("{{maestro_name}}", $maestro_name, $bodyMap['closedBetaRegistrationDone']); + + send_naver_mail($maestro_email, $maestro_name, $subject, $body); +} + + +// Extend +function sendMailExtensionBankInfo($maestro_name, $available_date, $new_available_date, $maestro_email, $registered_account_type) { +} + +function sendMailExtensionDone($maestro_name, $new_available_date, $maestro_email) { +} + + +// Upgrade +function sendMailUpgradeBankInfo($maestro_name, $maestro_email, $account_type, $upgrade_account_type) { +} + +function sendMailUpgradeDone($maestro_name, $maestro_email, $account_type, $upgrade_account_type) { +} + + +// Update +function sendMailUpdateMaestroName($maestro_name, $maestro_name_prev, $maestro_email) { +} + +function sendMailUpdateMaestroEmail($maestro_name, $maestro_email, $maestro_email_prev) { +} + +// experation +function sendMailExperation30days(maestro_name, $maestro_email, $maestro_email_prev) { + $body = "안녕하세요. + +[초코마에] 마에스트로 계정을 이용해 주셔서 감사합니다. + + +현재 이용중이신 마에스트로 계정의 유효기간이 30일밖에 남지 않았습니다. +* 유효 기간 : ~ 2020년 09월 02일 + +아래에 준비된 여러가지 방법 중 하나를 골라, 유효기간을 연장하실 수 있습니다. + +1) 마에스트로 관리 화면에서 [유효기간 연장] 버튼을 클릭 +: 현재 사용중이신 요금제를 유지하며, 남은 기간에 +1년을 추가로 사용하실 수 있습니다. + +2) 마에스트로 관리 화면에서 [업그레이드] 버튼을 클릭 +: 좀 더 많은 학생수로 업그레이드하고, 업그레이드한 날짜로부터 +1년을 추가로 사용하실 수 있습니다. + + +만약 연장, 업데이트하지 않고 유효기간이 만료되면 휴면 계정으로 전환됩니다. +학생 계정의 로그인이 안되고 서비스를 사용하실 수 없게 되는데요. 계정 정보 및 학생 정보는 6개월가량 유지됩니다. + +남은 기간동안 연장 신청 여부를 생각해봐주세요. +그리고 연장 신청을 원하신다면 기한 안에 꼭 신청 부탁드릴게요. + +감사합니다."; + send_naver_mail($maestro_email, $maestro_name, $subject, $body); +} + // Load Composer's autoloader // require $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php';