문서가 컬렉션에 추가되면 확장 프로그램에서 이메일 전송 처리를 위해 해당 문서를 선택합니다. 확장 프로그램은 이메일이 처리될 때 문서에 delivery 필드를 만들고 업데이트합니다.
이메일 전송 처리
delivery 필드는 다음의 필드로 채워질 수 있습니다.
state:PENDING, PROCESSING, SUCCESS 또는 ERROR 중 하나입니다.
startTime: 이메일 처리가 시작된 타임스탬프입니다.
endTime: 이메일 처리가 완료된 타임스탬프입니다(SUCCESS 또는 ERROR 상태로 종료).
error: 이메일 전송 오류가 발생하면 여기에 오류 메시지가 입력됩니다.
attempts: 이 이메일의 전송 시도 횟수입니다.
leaseExpireTime: 작업 중단 또는 시간 초과가 발생하는 경우 PROCESSING 상태가 오류로 간주되는 시간입니다.
info: 하나 이상의 주소로 이메일을 성공적으로 전송한 후 이 필드는 다음의 필드로 채워집니다.
messageId: 전송된 이메일의 메시지 ID입니다.
accepted: 이메일이 성공적으로 전송된 이메일 주소의 배열입니다.
rejected: 이메일을 전송할 수 없는 이메일 주소의 배열입니다.
pending: SMTP에 의해 일시적으로 거부된 이메일 주소의 배열입니다.
response: SMTP 서버의 마지막 응답입니다.
일반적으로 이메일은 PENDING에서 PROCESSING을 거쳐 SUCCESS 또는 ERROR로 상태가 전환됩니다. SUCCESS 또는 ERROR 상태가 되면 문서에 추가적인 변경사항이 발생해도 확장 프로그램은 다른 이메일을 전송하지 않습니다. 문서 업데이트로 이메일을 다시 전송하려면 state를 PENDING 또는 RETRY로 변경하면 됩니다.
수동 재시도
이메일 전송이 복구 가능한 방식으로 실패하거나 문서를 직접 약간만 수정하여 정상적으로 전송할 수 있는 경우가 있습니다. 재시도는 자동이 아니지만 확장 프로그램이 이메일 전송을 다시 시도하도록 delivery 필드에서 state를 RETRY로 수동 변경할 수 있습니다(이 경우 attempts의 수가 늘어남).
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-06(UTC)"],[],[],null,["\u003cbr /\u003e\n\nWhen a document is added to the collection, the extension picks it up for email\ndelivery processing. The extension creates and updates a `delivery` field in the\ndocument as it processes the email.\n\nEmail delivery processing\n\nThe `delivery` field can be populated with the following fields:\n\n- **state:** One of `PENDING`, `PROCESSING`, `SUCCESS`, or `ERROR`.\n- **startTime:** Timestamp when email processing began.\n- **endTime:** Timestamp when email processing completed (that is, ended in either a `SUCCESS` or `ERROR` state).\n- **error:** If there was an email delivery error, an error message will be populated here.\n- **attempts:** Number of delivery attempts for this email.\n- **leaseExpireTime:** In case of a hang or timeout, the time at which a `PROCESSING` state should be considered an error.\n- **info:** After successful email delivery (to at least one address), this field will be populated with the following fields:\n - **messageId:** The message ID of the delivered email.\n - **accepted:** Array of email addresses to which the email was successfully delivered.\n - **rejected:** Array of email addresses to which the email could not be delivered.\n - **pending:** Array of email addresses that were temporarily rejected by SMTP.\n - **response:** The last response from the SMTP server.\n\nAn email will typically go from `PENDING` to `PROCESSING` to either `SUCCESS` or\n`ERROR`. Once in the `SUCCESS` or `ERROR` state, additional changes to the\ndocument will not trigger the extension to send another email. To resend an\nemail with document updates, you can change the `state` to `PENDING` or `RETRY`.\n\nManual retries\n\nThere are instances in which email delivery fails in a recoverable fashion or\nthe document can be manually corrected for proper delivery with minor\nmodifications. While retries are not automatic, you can manually change the\n`state` in the `delivery` field to `RETRY` so that the extension attempts email\ndelivery again (and increments the number of `attempts`)."]]