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.
A channel where the presence of mt_file_key decides between LMS and MMS.
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
| Column | Required | Description |
|---|---|---|
channel_order | ✅ | 'mms' |
callback | ✅ | Sender number |
recipient | ✅ | Recipient number |
msg_status | ✅ | '1' |
request_date | ✅ | Send request time |
mt_content | ✅ | Message content (2000 bytes or less) |
mt_subject | Title (optional) | |
origin_cid | Sender identification code |
Example
-- 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
| Column | Required | Description |
|---|---|---|
channel_order | ✅ | 'mms' |
callback | ✅ | Sender number |
recipient | ✅ | Recipient number |
msg_status | ✅ | '1' |
request_date | ✅ | Send request time |
mt_content | ✅ | Message content |
mt_subject | Title | |
mt_file_key | ✅ | Attachment file key. Separate multiple files with , |
origin_cid | Sender 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.
-- 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)
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 ,.
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'
);