function execute($requests)
 {
     $v = array();
     $v['SNS_NAME'] = SNS_NAME;
     $v['cannot_send'] = true;
     $c_member_id_invite = 1;
     if ($requests['pc_mails'] && OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_PC) {
         $params = array('c_member' => db_member_c_member4c_member_id($c_member_id_invite), 'sid' => 'xxxxxxxxxx', 'invite_message' => $requests['message']);
         list($subject, $body) = fetch_mail_m_tpl('m_pc_syoutai_mail', $params);
         $v['pc_subject'] = $subject;
         $v['pc_body'] = $body;
         $v['cannot_send'] = false;
     }
     if ($requests['ktai_mails'] && (OPENPNE_REGIST_FROM & OPENPNE_REGIST_FROM_KTAI) >> 1) {
         $params['SNS_NAME'] = SNS_NAME;
         $params['url'] = openpne_gen_url('ktai', 'page_o_regist_pre') . '&ses=xxxxxxxxxx';
         $params['c_member'] = db_member_c_member4c_member_id($c_member_id_invite);
         $params['message'] = $requests['message'];
         list($subject, $body) = fetch_mail_m_tpl('m_ktai_regist_invite', $params);
         $v['ktai_subject'] = $subject;
         $v['ktai_body'] = $body;
         $v['cannot_send'] = false;
     }
     $this->set($v);
     return 'success';
 }
示例#2
0
function send_bbs_info_mail_pc($c_commu_topic_comment_id, $c_member_id)
{
    $comment = db_commu_c_commu_topic_comment4c_commu_topic_comment_id($c_commu_topic_comment_id);
    $c_member = db_member_c_member4c_member_id_LIGHT($c_member_id);
    $c_commu_id = $comment['c_commu_id'];
    $c_commu_topic_id = $comment['c_commu_topic_id'];
    $topic_name = $comment['topic_name'];
    $commu_name = $comment['commu_name'];
    $body = $comment['body'];
    $nickname = $c_member['nickname'];
    $p = array('target_c_commu_topic_id' => $c_commu_topic_id);
    $url = openpne_gen_url('pc', 'page_c_topic_detail', $p);
    $image_filename1 = $comment['image_filename1'];
    $image_filename2 = $comment['image_filename2'];
    $image_filename3 = $comment['image_filename3'];
    $image = $image_filename1 || $image_filename2 || $image_filename3;
    $params = array("topic_name" => $topic_name, "commu_name" => $commu_name, "nickname" => $nickname, "url" => $url, "body" => $body, "image_filename1" => $image_filename1, "image_filename2" => $image_filename2, "image_filename3" => $image_filename3);
    $tpl = fetch_mail_m_tpl("m_pc_bbs_info", $params);
    if (!$tpl) {
        return false;
    }
    list($subject, $body) = $tpl;
    $lst = db_common_receive_pc_address_list4c_commu_id($c_commu_id);
    foreach ($lst as $pc_address) {
        t_send_email($pc_address, $subject, $body, true);
    }
}
示例#3
0
function admin_fetch_send_mail($address, $tpl_name, $params = array(), $force = true, $from = '')
{
    $tpl_name .= '.tpl';
    if ($tpl = fetch_mail_m_tpl($tpl_name, $params)) {
        list($subject, $body) = $tpl;
        if ($from) {
            if (OPENPNE_MAIL_QUEUE) {
                //メールキューに蓄積
                put_mail_queue($address, $subject, $body, $force, $from);
            } else {
                t_send_email($address, $subject, $body, $force, $from);
            }
        } else {
            if (OPENPNE_MAIL_QUEUE) {
                //メールキューに蓄積
                put_mail_queue($address, $subject, $body, $force);
            } else {
                t_send_email($address, $subject, $body, $force);
            }
        }
        return true;
    } else {
        return false;
    }
}