LMS / MMS

You set channel_order to 'mms', and the message goes out as LMS or MMS depending on whether mt_file_key is present. For MMS, register the image in the file_upload table before you send, and use the file_key that is issued.

mmsLMS / MMS

A channel where the presence of mt_file_key decides between LMS and MMS.

Long message (LMS)Image attachmentfile_upload pre-registration

LMS

If you send without mt_file_key, the message goes out as a long message (LMS). You can enter up to 2,000 bytes.

Input fields

ColumnRequiredDescription
channel_order'mms'
callbackSender number
recipientRecipient number
msg_status'1'
request_dateSend request time
mt_contentMessage content (2000 bytes or less)
mt_subjectTitle (optional)
origin_cidSender identification code

Example

SQL
-- LMS 발송 (mt_file_key 없이 발송)
INSERT INTO msg_tran (
    channel_order, recipient, msg_status, request_date,
    callback, mt_subject, mt_content
) VALUES (
    'mms', '수신번호', '1', NOW(),
    '발신번호', 'LMS 제목', '장문(LMS) 본문 내용입니다.'
);

MMS

This is a message with an image attached. mt_file_key is required — register the image in the file_upload table before you send, and use the file_key that is issued.

Input fields

ColumnRequiredDescription
channel_order'mms'
callbackSender number
recipientRecipient number
msg_status'1'
request_dateSend request time
mt_contentMessage content
mt_subjectTitle
mt_file_keyAttachment file key. Separate multiple files with ,
origin_cidSender identification code

Pre-register the file

Before you send an MMS, you must register the image in the file_upload table.
FileUploadScheduler uploads it automatically and fills in file_key.

SQL
-- 1. 파일 등록
INSERT INTO file_upload (file_path, channel_type)
VALUES ('/home/omni/attach_file/sample.jpg', 'MMS');

-- 2. file_status = 2, file_key가 채워지면 발송에 사용 가능
SELECT file_key FROM file_upload WHERE file_path = '/home/omni/attach_file/sample.jpg';

Examples

Send an MMS (1 file)

SQL
INSERT INTO msg_tran (
    channel_order, recipient, msg_status, request_date,
    callback, mt_subject, mt_content, mt_file_key
) VALUES (
    'mms', '수신번호', '1', NOW(),
    '발신번호', 'MMS 제목', 'MMS 본문 내용입니다.', 'FILE_KEY'
);

Send an MMS (2 files)

You can attach several files by separating mt_file_key values with ,.

SQL
INSERT INTO msg_tran (
    channel_order, recipient, msg_status, request_date,
    callback, mt_subject, mt_content, mt_file_key
) VALUES (
    'mms', '수신번호', '1', NOW(),
    '발신번호', 'MMS 제목', 'MMS 본문 내용입니다.', 'FILE_KEY1,FILE_KEY2'
);