MapiMessage
개요
MapiMessage은(는) Aspose.Email FOSS에서 Python을(를) 위해 제공되는 클래스입니다.
MSG와 EmailMessage 변환을 지원하는 가변 고수준 MSG 객체.
이 클래스는 Python 프로그램에서 MapiMessage 객체를 다루기 위한 22개의 메서드를 제공합니다. 사용 가능한 메서드에는 add_attachment, add_embedded_message_attachment, add_recipient, close, create, from_email_message, from_file, from_msg_document, get_named_property, get_property, get_property_value, iter_attachments_info 및 추가 10개의 메서드가 포함됩니다. Aspose.Email FOSS for Python 패키지를 설치한 후 모든 Python 애플리케이션에서 모든 public 멤버에 접근할 수 있습니다. 속성: attachments, body, body_html, declared_attachment_count, declared_next_attachment_id, declared_next_recipient_id 및 추가 19개.
속성
| 이름 | 유형 | 액세스 | 설명 |
|---|---|---|---|
msg_reader | MsgReader | 읽기 | msg 리더를 가져옵니다. |
validation_issues | tuple[str, ...] | 읽기 | 유효성 검사 문제를 가져옵니다. |
subject | `str | None` | 읽기/쓰기 |
body | `str | None` | 읽기/쓰기 |
message_class | `str | None` | 읽기/쓰기 |
body_html | `str | None` | 읽기/쓰기 |
unicode_strings | bool | 읽기/쓰기 | Unicode 문자열을 가져오거나 설정합니다. |
properties | MapiPropertyCollection | 읽기/쓰기 | 속성을 가져오거나 설정합니다. |
recipients | list[MapiRecipient] | 읽기/쓰기 | 수신자를 가져오거나 설정합니다. |
attachments | list[MapiAttachment] | 읽기/쓰기 | 첨부 파일을 가져오거나 설정합니다. |
extra_streams | list[MsgStream] | 읽기/쓰기 | 추가 스트림을 가져오거나 설정합니다. |
extra_storages | list[MsgStorage] | 읽기/쓰기 | 추가 저장소를 가져오거나 설정합니다. |
nameid_mapping | _NamedPropertyMapping | 읽기/쓰기 | nameid 매핑을 가져오거나 설정합니다. |
major_version | int | 읽기/쓰기 | 주 버전을 가져오거나 설정합니다. |
minor_version | int | 읽기/쓰기 | 마이너 버전을 가져오거나 설정합니다. |
transaction_signature_number | int | 읽기/쓰기 | 거래 서명 번호를 가져오거나 설정합니다. |
header_reserved_0 | bytes | 읽기/쓰기 | 헤더 예약 0을 가져오거나 설정합니다. |
header_reserved_1 | bytes | 읽기/쓰기 | 헤더 예약 1을 가져오거나 설정합니다. |
emit_store_support_mask | bool | 읽기/쓰기 | Emit store 지원 마스크를 가져오거나 설정합니다. |
emit_compatibility_defaults | bool | 읽기/쓰기 | emit 호환성 기본값을 가져오거나 설정합니다. |
preserve_declared_header_counts | bool | 읽기/쓰기 | 보존된 선언 헤더 수를 가져오거나 설정합니다. |
declared_next_recipient_id | `int | None` | 읽기/쓰기 |
declared_next_attachment_id | `int | None` | 읽기/쓰기 |
declared_recipient_count | `int | None` | 읽기/쓰기 |
declared_attachment_count | `int | None` | 읽기/쓰기 |
메서드
| 시그니처 | 설명 |
|---|---|
| `from_file(path: Path | str, strict: bool)→“MapiMessage”` |
from_msg_document(document: MsgDocument) → "MapiMessage" | 이 MapiMessage 인스턴스에서 from_msg_document(document)를 호출합니다. |
from_email_message(email_message: EmailMessage, unicode_strings: bool) → "MapiMessage" | 이 MapiMessage 인스턴스에서 from_email_message(email_message, unicode_strings)를 호출합니다. |
create(subject: str, body: str, unicode_strings: bool) → "MapiMessage" | 이 MapiMessage 인스턴스에서 create(subject, body, unicode_strings)를 호출합니다. |
iter_properties() → Iterator[MapiProperty] | 이 MapiMessage 인스턴스에서 iter_properties를 호출합니다. |
iter_property_keys(storage_stream_id: int) → Iterator[tuple[int, int]] | 이 MapiMessage 인스턴스에서 iter_property_keys(storage_stream_id)를 호출합니다. |
| `set_property(property_id: int | CommonMessagePropertyId |
| `get_property(property_id: int | CommonMessagePropertyId |
| `get_property_value(property_id: int | CommonMessagePropertyId |
| `set_named_property(named_property: MapiNamedProperty, property_type: int | PropertyTypeCode, value: Any, flags: int)→MapiProperty` |
| `get_named_property(named_property: MapiNamedProperty, property_type: int | None)→MapiProperty |
| `add_recipient(email_address: str, display_name: str | None, recipient_type: int)→MapiRecipient` |
| `add_attachment(filename: str, data: bytes, mime_type: str | None, content_id: str |
| `add_embedded_message_attachment(message: “MapiMessage”, filename: str | None, mime_type: str |
| `save(path: Path | str)` |
to_bytes() → bytes | 이 MapiMessage 인스턴스에서 to_bytes을 호출합니다. |
to_email_message() → EmailMessage | 이 MapiMessage 인스턴스에서 to_email_message을 호출합니다. |
to_email_bytes() → bytes | 이 MapiMessage 인스턴스에서 to_email_bytes를 호출합니다. |
to_email_string() → str | 이 MapiMessage 인스턴스에서 to_email_string를 호출합니다. |
iter_attachments_info() → Iterator[MapiAttachment] | 이 MapiMessage 인스턴스에서 iter_attachments_info를 호출합니다. |
close() | 이 MapiMessage 인스턴스에서 close를 호출합니다. |
to_msg_document() → MsgDocument | 이 MapiMessage 인스턴스에서 to_msg_document를 호출합니다. |