Quản lý trạng thái gửi bằng phần mở rộng Email kích hoạt
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Khi một tài liệu được thêm vào bộ sưu tập, tiện ích sẽ chọn tài liệu đó để xử lý việc gửi email. Tiện ích này sẽ tạo và cập nhật trường delivery trong tài liệu khi xử lý email.
Xử lý việc gửi email
Bạn có thể điền sẵn trường delivery bằng các trường sau:
state: Một trong số PENDING, PROCESSING, SUCCESS hoặc ERROR.
startTime: Dấu thời gian khi quá trình xử lý email bắt đầu.
endTime: Dấu thời gian khi quá trình xử lý email hoàn tất (tức là kết thúc ở trạng thái SUCCESS hoặc ERROR).
error: Nếu có lỗi khi gửi email, thông báo lỗi sẽ xuất hiện ở đây.
attempts: Số lần gửi email này.
leaseExpireTime: Trong trường hợp bị treo hoặc hết thời gian chờ, thời gian mà trạng thái PROCESSING sẽ được coi là lỗi.
info: Sau khi gửi email thành công (đến ít nhất một địa chỉ), trường này sẽ được điền sẵn các trường sau:
messageId: Mã nhận dạng thư của email đã gửi.
accepted: Mảng địa chỉ email mà email đã được gửi thành công.
rejected: Mảng địa chỉ email mà email không gửi được.
pending:Mảng địa chỉ email tạm thời bị SMTP từ chối.
response: Phản hồi cuối cùng từ máy chủ SMTP.
Thông thường, email sẽ được gửi từ PENDING đến PROCESSING, rồi đến SUCCESS hoặc ERROR. Khi ở trạng thái SUCCESS hoặc ERROR, các thay đổi khác đối với tài liệu sẽ không kích hoạt tiện ích gửi email khác. Để gửi lại email có nội dung cập nhật về tài liệu, bạn có thể thay đổi state thành PENDING hoặc RETRY.
Thử lại theo cách thủ công
Trong một số trường hợp, việc gửi email không thành công theo cách có thể khôi phục hoặc bạn có thể sửa đổi tài liệu theo cách thủ công để gửi đúng cách với một số điểm chỉnh sửa nhỏ. Mặc dù các lần thử lại không tự động, nhưng bạn có thể thay đổi state trong trường delivery thành RETRY theo cách thủ công để tiện ích thử lại việc gửi email (và tăng số lượng attempts).
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 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`)."]]