getMail
    • PDF

    getMail

    • PDF

    Article Summary

    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 nameRequired statusTypeRestrictionsDescription
    mailIdYesStringEmail ID (to identify each email)

    Response

    HTTP status codeDescription
    200Success
    400Authentication failed, invalid request.
    500Server 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

    CategoryRequired statusTypeRestrictionsDescription
    requestIdYesStringRequest 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.
    mailIdYesStringEmail ID (to identify each email)
    requesterIpYesStringIP of the person who requested sending the email.
    titleYesStringEmail title
    bodyYesStringEmail content
    templateSidNoIntegerTemplate ID
    templateNameNoStringTemplate name
    senderAddressYesStringSender's email address
    senderNameNoStringSender's name
    emailStatusYesStatusDelivery status
    requestDateYesNesDateTimeRequested date and time
    sendDateNoNesDateTimeSent date and time
    reservationDateNoNesDateTimeScheduled date and time
    advertisingYesBooleanIndicates whether it is a promotional email.
    referencesHeaderNoStringReferences 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)
    attachFilesNoList<AttachFile>List of attached files
    recipientsYesList<Recipient>List of recipients

    Error codes

    HTTP Status CodeReturn codeResponse message
    40077101Error in login information
    40077102BAD_REQUEST
    40077103Resource not found
    40377201No permission
    40377202No request to subscribe the email product
    40577001METHOD_NOT_ALLOWED
    41577002UNSUPPORTED_MEDIA_TYPE
    50077301Default project not found
    50077302Error in working with external system API
    50077303Other INTERNAL_SERVER_ERROR

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.