public static class Attachment.Builder extends Object
| 构造器和说明 |
|---|
Builder() |
| 限定符和类型 | 方法和说明 |
|---|---|
Attachment.Builder |
attachmentType(AttachmentAttachmentTypeEnum attachmentType)
附件类型
示例值:1
|
Attachment.Builder |
attachmentType(Integer attachmentType)
附件类型
示例值:1
|
Attachment.Builder |
body(String body)
附件的正文,使用 base64url 编码(支持的文件最大 37MB)
示例值:aGVsbG8gd29ybGQK
|
Attachment |
build() |
Attachment.Builder |
cid(String cid)
内容 ID,HTML 中通过 cid: 协议引用该图片
示例值:image1@example.com
|
Attachment.Builder |
filename(String filename)
附件文件名
示例值:helloworld.txt
|
Attachment.Builder |
id(String id)
附件 id
示例值:YQqYbQHoQoDqXjxWKhJbo8Gicjf
|
Attachment.Builder |
isInline(Boolean isInline)
是否为内联图片,true 表示是内联图片
示例值:false
|
public Attachment.Builder body(String body)
示例值:aGVsbG8gd29ybGQK
body - public Attachment.Builder filename(String filename)
示例值:helloworld.txt
filename - public Attachment.Builder id(String id)
示例值:YQqYbQHoQoDqXjxWKhJbo8Gicjf
id - public Attachment.Builder attachmentType(Integer attachmentType)
示例值:1
attachmentType - public Attachment.Builder attachmentType(AttachmentAttachmentTypeEnum attachmentType)
示例值:1
attachmentType - AttachmentAttachmentTypeEnumpublic Attachment.Builder isInline(Boolean isInline)
示例值:false
isInline - public Attachment.Builder cid(String cid)
示例值:image1@example.com
cid - public Attachment build()
Copyright © 2026. All rights reserved.