contact us 전송하기 버튼 문의드립니다

contact us 전송하기 버튼 문의드립니다

QA

contact us 전송하기 버튼 문의드립니다

답변 4

본문

안녕하세요 

거래처에서 전송하기 버튼을 누르면 관리자에게 메일이나 휴대폰으로 알림이 오게 해달라고 요청하셨는데 

그누보드 사용시 코딩으로 작업 가능할까요?ㅜㅜ 

 

 

 

3034737284_1694670526.7722.png

이 질문에 댓글 쓰기 :

답변 4

전송을 처리하는 페이지가 존재할 것으로 보입니다.

그파일을 열어보시면 저장 sql 처리들이 있을것입니다.

메일 보내기 소스 또는 문자 보내기 소스를 넣어주시면 됩니다.

아래는 예시일뿐 본인 서버 환경에 맞추셔야됩니다.

 

메일보내기 예로

include_once(G5_LIB_PATH.'/mailer.lib.php');

mailer($wr_name, $wr_email, $super_admin[mb_email], $wr_subject, $content, 1);

>>  메일 보내기 소스를 인크루드 하고 메일 보내기 ( 보내는사람이름, 보내는이메일, 받는이메일, 제목, 내용

 

문자 보내기 예로

include_once(G5_LIB_PATH.'/icode.sms.lib.php');

// 문의글 등록시 관리자에게 전송
$send_hp_mb = "*** 개인정보보호를 위한 휴대폰번호 노출방지 ***"; // 보내는 전화번호
$recv_hp_mb = "*** 개인정보보호를 위한 휴대폰번호 노출방지 ***"; //  받는 전화번호

$send_hp = str_replace("-","",$send_hp_mb); // - 제거
$recv_hp = str_replace("-","",$recv_hp_mb); // - 제거

$send_number =  "$send_hp";
$recv_number = "$recv_hp";

$sms_content = $wr_name." 님이 ".$wr_subject." 신청을 하셨습니다.";  // 문자 내용     

$SMS = new SMS; // SMS 연결
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
$SMS->Send();

// 문자보내기 끝

PHPMailer 라이브러리를 사용하면 능히 가능합니다.

그누보드내의 자체 메일기능도 있을듯합니다.



<?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

// Load Composer's autoloader
require 'vendor/autoload.php';

// Instantiation and passing `true` enables exceptions
$mail = new PHPMailer(true);

try {
    //Server settings
    $mail->SMTPDebug = 2;                                       // Enable verbose debug output
    $mail->isSMTP();                                            // Set mailer to use SMTP
    $mail->Host       = 'smtp1.example.com;smtp2.example.com';  // Specify main and backup SMTP servers
    $mail->SMTPAuth   = true;                                   // Enable SMTP authentication
    $mail->Username   = '*** 개인정보보호를 위한 이메일주소 노출방지 ***';                     // SMTP username
    $mail->Password   = 'secret';                               // SMTP password
    $mail->SMTPSecure = 'tls';                                  // Enable TLS encryption, `ssl` also accepted
    $mail->Port       = 587;                                    // TCP port to connect to

    //Recipients
    $mail->setFrom('*** 개인정보보호를 위한 이메일주소 노출방지 ***', 'Mailer');
    $mail->addAddress('*** 개인정보보호를 위한 이메일주소 노출방지 ***', 'Joe User');     // Add a recipient
    $mail->addAddress('*** 개인정보보호를 위한 이메일주소 노출방지 ***');               // Name is optional
    $mail->addReplyTo('*** 개인정보보호를 위한 이메일주소 노출방지 ***', 'Information');
    $mail->addCC('*** 개인정보보호를 위한 이메일주소 노출방지 ***');
    $mail->addBCC('*** 개인정보보호를 위한 이메일주소 노출방지 ***');

    // Attachments
    $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
    $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name

    // Content
    $mail->isHTML(true);                                  // Set email format to HTML
    $mail->Subject = 'Here is the subject';
    $mail->Body    = 'This is the HTML message body <b>in bold!</b>';
    $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

    $mail->send();
    echo 'Message has been sent';
} catch (Exception $e) {
    echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
  • 질문이 없습니다.
전체 0
© SIRSOFT
현재 페이지 제일 처음으로