getMail
- Print
- PDF
getMail
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Searches a request to send an email.
Searches a list of emails requested to be sent.
GET https://{endpoint}/mails/{mailId}
Request
Request parameters
Parameter name | Required status | Type | Restrictions | Description |
---|---|---|---|---|
mailId | Yes | String | Email ID (to identify each email) |
Response
HTTP status code | Description |
---|---|
200 | Success |
400 | Authentication failed, invalid request. |
500 | Server errors |
Example
Request example
GET https://mail.apigw.ntruss.com/api/v1/mails/20181120000000011009
Response example
{
"requestId":"20181120000000010999",
"requesterIp":"10.78.xx.73",
"requestDate":{
"utc":1542694793240,
"formattedDate":"2018-11-20",
"formattedDateTime":"2018-11-20 15:19:53 240"
},
"mailId":"20181120000000011009",
"title":"test!",
"templateSid":41,
"templateName":"test2",
"emailStatus":{
"label":"Partially failed",
"code":"PF"
},
"senderAddress":"a@ac.om",
"senderName":null,
"sendDate":{
"utc":1542694793856,
"formattedDate":"2018-11-20",
"formattedDateTime":"2018-11-20 15:19:53 856"
},
"reservationDate":null,
"body":"<body>...</body>",
"referencesHeader":null,
"attachFiles":[
],
"recipients":[
{
"address":"test123456789@ncp-mail.com",
"name":"",
"type":{
"label":"Recipient",
"code":"R"
},
"received":false,
"receivedDate":null,
"status":{
"label":"Failed to send",
"code":"F"
},
"retryCount":0,
"sendResultMessage":"550 5.1.1 No such user 3vir-yOYtA9fRTlWpjkR3 - nsmtp\n",
"sendResultCode":"RECIPIENT_ADDRESS_ERROR",
"sendResultCodeMessage":"Sending failed due to recipient address error."
},
{
"address":"test12@ncp-mail.com",
"name":"",
"type":{
"label":"Recipient",
"code":"R"
},
"received":false,
"receivedDate":null,
"status":{
"label":"Sent successfully",
"code":"S"
},
"retryCount":0,
"sendResultMessage":"Mail sent.",
"sendResultCode":"MAIL_SENT",
"sendResultCodeMessage":"Sending mail succeeded."
}
],
"advertising":false
}
Property
Category | Required status | Type | Restrictions | Description |
---|---|---|---|---|
requestId | Yes | String | Request ID to send an email (for identifying each request). If you make a request to send multiple messages at the same time, then the requestId can contain multiple mailIds. | |
mailId | Yes | String | Email ID (to identify each email) | |
requesterIp | Yes | String | IP of the person who requested sending the email. | |
title | Yes | String | Email title | |
body | Yes | String | Email content | |
templateSid | No | Integer | Template ID | |
templateName | No | String | Template name | |
senderAddress | Yes | String | Sender's email address | |
senderName | No | String | Sender's name | |
emailStatus | Yes | Status | Delivery status | |
requestDate | Yes | NesDateTime | Requested date and time | |
sendDate | No | NesDateTime | Sent date and time | |
reservationDate | No | NesDateTime | Scheduled date and time | |
advertising | Yes | Boolean | Indicates whether it is a promotional email. | |
referencesHeader | No | String | References header (It must be in the form of <unique_id@domain.com>). The NAVER Mail service enables you to view messages with the same references header. To view specific messages altogether, the value must be unique. Messages with the same references header are grouped and displayed as one mail thread. This property can have one or more values. (Only the uppermost value of the references header is used) | |
attachFiles | No | List<AttachFile> | List of attached files | |
recipients | Yes | List<Recipient> | List of recipients |
Error codes
HTTP Status Code | Return code | Response message |
---|---|---|
400 | 77101 | Error in login information |
400 | 77102 | BAD_REQUEST |
400 | 77103 | Resource not found |
403 | 77201 | No permission |
403 | 77202 | No request to subscribe the email product |
405 | 77001 | METHOD_NOT_ALLOWED |
415 | 77002 | UNSUPPORTED_MEDIA_TYPE |
500 | 77301 | Default project not found |
500 | 77302 | Error in working with external system API |
500 | 77303 | Other INTERNAL_SERVER_ERROR |
Was this article helpful?