Get mail

Prev Next

Available in Classic and VPC

Get the details of a single mail included in a send request. The mail subject and body, the attachment list, and the sending result for each recipient (recipients[]) are returned together.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /mail/v2/services/{serviceId}/requests/{requestId}/mails/{mailId}

Request headers

For information about the headers common to all Simple & Easy Notification Service APIs, see Simple & Easy Notification Service request headers.

Field Required Description
x-ncp-lang Optional Response message language
  • en-US (default) | ko-KR | ja-JP

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
serviceId String Required Mail service ID
  • NRN (NCP Resource Name) format (e.g., ncp:mail:kr:1********2:main)
  • See Get project list.
requestId String Required Send request ID
mailId String Required Mail ID
  • Must be a mail that belongs to the requestId in the path
  • See Get mail list.

Request example

The request example is as follows:

curl --location --request GET 'https://sens.apigw.ntruss.com/mail/v2/services/ncp:mail:kr:1********2:main/requests/20260712-R-01K0ZQ8YV3M4N5P6R7S8T9VAWX-777/mails/20260712-M-01K0ZQ8YVBQ7C2D3E4F5G6H7J8-777' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-lang: en-US'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
requestId String - Send request ID
mailId String - Mail ID
requesterIp String - IP address of the client that requested the sending
  • The source address at the time of the request is recorded for both console and API sending.
createDateTime String - Date and time the send request was accepted
  • ISO 8601 format
title String - Mail subject
  • The result after substitution variables are replaced with actual values
templateNo Integer - Number of the template used
  • null if the mail was sent without a template
templateName String - Name of the template used
  • null if the mail was sent without a template
status String - Mail sending status
  • READY | RESERVED | SENDING | COMPLETED | FAILED | PARTIAL_FAILED | CANCELED
    • READY: waiting to start sending
    • RESERVED: waiting for the reserved sending time
    • SENDING: the mail is being sent
    • COMPLETED: the mail was sent to all of its recipients
    • FAILED: the mail failed to be sent to all of its recipients
    • PARTIAL_FAILED: the mail failed to be sent to some of its recipients
    • CANCELED: sending has been canceled
senderAddress String - Sender email address
senderName String - Sender name
  • null if not entered
sendDateTime String - Date and time sending was completed
  • ISO 8601 format
  • null if sending has not started
reservationDateTime String - Reserved sending date and time
  • ISO 8601 format
  • null for immediate sending
body String - Mail body
  • The result after substitution variables are replaced with actual values
  • Includes the unsubscribe message if advertising is true
advertising Boolean - Whether the mail is an advertisement
  • true | false
attachFiles Array - Attachment list: attachFiles
  • An empty array if there are no attachments
recipients Array - List of sending results by recipient: recipients
  • Includes CC and BCC recipients
  • Group sending splits recipients into mails of up to 30 recipients each, so there are at most 30 items.
  • Individual sending creates one mail per recipient, so there is one item.

attachFiles

The following describes attachFiles.

Field Type Required Description
fileId String - Attachment ID
fileName String - Attachment name
  • Up to 100 characters
fileSize Integer - Attachment size (bytes)

recipients

The following describes recipients.

Field Type Required Description
address String - Recipient email address
name String - Recipient name
  • null if not entered
type String - Recipient type
  • TO | CC | BCC
    • TO: recipient
    • CC: carbon copy
    • BCC: blind carbon copy
received Boolean - Whether the mail has been opened
  • true | false
    • true: the recipient has opened the mail
    • false: the mail has not been opened
receivedDateTime String - Date and time the mail was opened
  • ISO 8601 format
  • null if the mail has not been opened
status String - Sending status by recipient
  • READY | RESERVED | SENDING | RETRYING | COMPLETED | FAILED | ERRORED | UNSUBSCRIBED | BLOCKED | CANCELED
    • READY: waiting to start sending
    • RESERVED: waiting for the reserved sending time
    • SENDING: attempting to deliver the mail to the recipient
    • RETRYING: waiting for a retry scheduled after a temporary failure
    • COMPLETED: the mail was delivered to the recipient successfully
    • FAILED: sending failed, for example because the receiving server rejected the mail
    • ERRORED: sending ended with an error during processing
    • UNSUBSCRIBED: not sent because the address has unsubscribed
    • BLOCKED: not sent because the address is on the send block list
    • CANCELED: sending has been canceled
retryCount Integer - Number of sending retries
  • The first sending attempt is not counted as a retry.
sendResultCode String - Sending result code
  • For all values, see sendResultCode.
  • An open set to which values may be added
  • null for recipients whose sending is not complete
sendResultMessage String - Original sending result message
  • The original SMTP response returned by the receiving mail server
  • null for recipients whose sending is not complete

sendResultCode

The following describes recipients[].sendResultCode.

Code Description
CANCELED_MAIL Sending canceled
CONNECTION_ABNORMAL Temporary sending failure due to a connection abnormality
CONTENT_HAS_TAG_FORM Sending failed because the mail content contains a substitution tag
DKIM_FAIL Sending failed due to a DKIM error
EMPTY_BODY_CONTENT Sending failed because the mail body could not be set due to a system error
MAILBOX_ABNORMAL Temporary sending failure due to an abnormality in the recipient's mailbox
MAILBOX_ERROR Sending failed due to an error in the recipient's mailbox
MAIL_CONTENTS_ERROR Sending failed due to a mail content error
MAIL_SENT Sent successfully
MIME_MESSAGE_CREATE_FAIL Sending failed because the MIME message could not be created due to a system error
NETWORK_ABNORMAL Temporary sending failure due to a network abnormality
NETWORK_ERROR Sending failed due to a network error
NONEXISTENT_DOMAIN_ADDRESS Sending failed because the recipient's domain does not exist
RECEIVE_MAIL_SERVICE_ABNORMAL Temporary sending failure due to an abnormality in the recipient's mail service
RECEIVE_MAIL_SERVICE_ERROR Sending failed due to an error in the recipient's mail service
RECIPIENT_ADDRESS_ERROR Sending failed due to a recipient address error
RESENDING_MAIL Resending in progress
RESEND_MAIL_FAIL Sending failed because the resend attempts were exceeded
SECURITY_AND_POLICY_ABNORMAL Temporary sending failure due to a security and policy abnormality
SECURITY_AND_POLICY_ERROR Sending failed due to a security and policy error
SEND_BLOCK_ADDRESS Blocked because sending was requested to a recipient on the send block list
SMTP_ABNORMAL Temporary sending failure due to an SMTP abnormality with the receiving side
SMTP_ERROR Sending failed due to an SMTP error with the receiving side
TEST_MAIL_SEND Test mail sent by the system
UNDEFINED_ERROR Sending failed due to an undefined error
UNKNOWN_CAUSE_FAIL Sending failed due to an unknown error inside or outside the system
UNKNOWN_DOMAIN_ADDRESS Sending failed because sending was requested to an address with an unknown or blocked domain
UNSUBSCRIBE_ADDRESS Blocked because sending was requested to an unsubscribed address
UNSUPPORTED_ENCODING_ADDRESS Sending failed because the recipient address could not be encoded
READ_TIMED_OUT Sending failed because the receiving server did not respond
CONNECTION_ERROR Sending failed because the receiving server closed the connection
Note
  • mailId must be a mail that belongs to the requestId in the path. For callers with permission, 404 is returned if it does not belong to the request.
  • For mails whose sending is not complete, sendDateTime, recipients[].sendResultCode, and recipients[].sendResultMessage are null.

Response status codes

The following describes the response status codes.

HTTP status code Code Message Description
200 - OK Request succeeded
400 InvalidParameter Bad Request Request parameter error
401 Unauthorized Unauthorized Authentication failed
403 Forbidden Forbidden No permission for the serviceId in the path
404 NotFound Not Found The requestId or mailId in the path does not exist
500 InternalServerError Internal Server Error Internal server error
Note

Unlike other Simple & Easy Notification Service APIs, the mail v2 API returns errors in the NCP API standard error format. Instead of the status and error (string) fields in the response body, the error object below is returned.

Error response body

The response body when a call fails includes the following data:

Field Type Required Description
error Object - Error information
error.errorCode String - Error code
  • See the Code column of the response status code table.
error.message String - Fixed message for each error code
  • Returned in the language specified in the x-ncp-lang header
error.detail String - Detailed reason for the request
  • Omitted if there is no applicable reason
error.fieldErrors Array - List of errors by parameter
  • field: name of the parameter with the error
  • message: reason for the error
  • Omitted if the error is not a parameter error

Error response example

The response example when a call fails is as follows:

{
"error": {
"errorCode": "NotFound",
"message": "The requested resource was not found."
}
}

Response example

The response example is as follows:

{
"requestId": "20260712-R-01K0ZQ8YV3M4N5P6R7S8T9VAWX-777",
"mailId": "20260712-M-01K0ZQ8YVBQ7C2D3E4F5G6H7J8-777",
"requesterIp": "203.0.113.42",
"createDateTime": "2026-07-12T15:19:53+09:00",
"title": "Welcome, Hong Gildong.",
"templateNo": 41,
"templateName": "Membership level change notice",
"status": "PARTIAL_FAILED",
"senderAddress": "no_reply@company.com",
"senderName": "Customer Center",
"sendDateTime": "2026-07-12T15:19:53+09:00",
"reservationDateTime": null,
"body": "<body>Your membership level has been changed from SILVER to GOLD.</body>",
"advertising": false,
"attachFiles": [
{
"fileId": "8f14e45fceea167a5a36dedd4bea2543",
"fileName": "membership_guide.pdf",
"fileSize": 204800
}
],
"recipients": [
{
"address": "hongildong@example.com",
"name": "Hong Gildong",
"type": "TO",
"received": false,
"receivedDateTime": null,
"status": "COMPLETED",
"retryCount": 0,
"sendResultCode": "MAIL_SENT",
"sendResultMessage": "Mail sent."
},
{
"address": "test12@example.com",
"name": null,
"type": "CC",
"received": false,
"receivedDateTime": null,
"status": "FAILED",
"retryCount": 0,
"sendResultCode": "RECIPIENT_ADDRESS_ERROR",
"sendResultMessage": "550 5.1.1 No such user - nsmtp"
}
]
}