Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Fetch meta data
run: python3 scripts/fetch_meta.py
- name: Run tests
run: go test -v -race -count=1 -timeout=5m ./cmd/... ./internal/... ./shortcuts/... ./extension/...
run: go test -v -race -count=1 -timeout=5m ./cmd/... ./internal/... ./shortcuts/...

lint:
needs: fast-gate
Expand All @@ -82,8 +82,6 @@ jobs:
run: python3 scripts/fetch_meta.py
- name: Run golangci-lint
run: go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main
- name: Run errs/ lint guards (lintcheck)
run: go run -C lint . ..

coverage:
needs: fast-gate
Expand Down
21 changes: 20 additions & 1 deletion shortcuts/mail/mail_draft_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
draftpkg "github.com/larksuite/cli/shortcuts/mail/draft"
"github.com/larksuite/cli/shortcuts/mail/emlbuilder"
"github.com/larksuite/cli/shortcuts/mail/lint"
"github.com/larksuite/cli/shortcuts/mail/signature"
)

// draftCreateInput bundles all +draft-create user flags into a single
Expand Down Expand Up @@ -56,6 +57,7 @@
{Name: "request-receipt", Type: "bool", Desc: "Request a read receipt (Message Disposition Notification, RFC 3798) addressed to the sender. Recipient mail clients may prompt the user, send automatically, or silently ignore — delivery of a receipt is not guaranteed."},
{Name: "template-id", Desc: "Optional. Apply a saved template by ID (decimal integer string) before composing. The template's subject/body/to/cc/bcc/attachments are merged with user-supplied flags (user flags win). Requires --as user."},
signatureFlag,
noSignatureFlag,
priorityFlag,
eventSummaryFlag, eventStartFlag, eventEndFlag, eventLocationFlag,
showLintDetailsFlag,
Expand Down Expand Up @@ -180,7 +182,24 @@
if strings.TrimSpace(input.Body) == "" {
return mailValidationParamError("--body", "effective body is empty after applying template; pass --body explicitly")
}
sigResult, err := resolveSignature(ctx, runtime, mailboxID, runtime.Str("signature-id"), runtime.Str("from"))
signatureID := runtime.Str("signature-id")
senderEmail := runtime.Str("from")
noSignature := runtime.Bool("no-signature")
if noSignature {
if signatureID != "" {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: --signature-id ignored because --no-signature is set\n")

Check warning on line 191 in shortcuts/mail/mail_draft_create.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_draft_create.go#L189-L191

Added lines #L189 - L191 were not covered by tests
}
signatureID = ""

Check warning on line 193 in shortcuts/mail/mail_draft_create.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_draft_create.go#L193

Added line #L193 was not covered by tests
} else if signatureID == "" && !input.PlainText {
if resp, lErr := signature.ListAll(runtime, mailboxID); lErr == nil {
signatureID = signature.DefaultSendID(resp.Usages, senderEmail)

Check warning on line 196 in shortcuts/mail/mail_draft_create.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_draft_create.go#L196

Added line #L196 was not covered by tests
} else {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: failed to fetch default signature: %v\n", lErr)
}
}
sigResult, err := resolveSignature(ctx, runtime, mailboxID, signatureID, senderEmail)
if err != nil {
return err
}
Expand Down
17 changes: 17 additions & 0 deletions shortcuts/mail/mail_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"github.com/larksuite/cli/shortcuts/common"
draftpkg "github.com/larksuite/cli/shortcuts/mail/draft"
"github.com/larksuite/cli/shortcuts/mail/emlbuilder"
"github.com/larksuite/cli/shortcuts/mail/signature"
)

// MailForward is the `+forward` shortcut: forward an existing message to
Expand Down Expand Up @@ -45,6 +46,7 @@
{Name: "subject", Desc: "Optional. Override the auto-generated Fw: subject. When set, the shortcut uses this value verbatim instead of prefixing the original subject."},
{Name: "template-id", Desc: "Optional. Apply a saved template by ID (decimal integer string) before composing. The template's body/to/cc/bcc/attachments are merged into the forward draft (template values appended to user flags / forward-derived values; no de-duplication)."},
signatureFlag,
noSignatureFlag,
priorityFlag,
eventSummaryFlag, eventStartFlag, eventEndFlag, eventLocationFlag,
showLintDetailsFlag},
Expand Down Expand Up @@ -129,6 +131,21 @@

signatureID := runtime.Str("signature-id")
mailboxID := resolveComposeMailboxID(runtime)
noSignature := runtime.Bool("no-signature")
if noSignature {
if signatureID != "" {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: --signature-id ignored because --no-signature is set\n")

Check warning on line 138 in shortcuts/mail/mail_forward.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_forward.go#L136-L138

Added lines #L136 - L138 were not covered by tests
}
signatureID = ""

Check warning on line 140 in shortcuts/mail/mail_forward.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_forward.go#L140

Added line #L140 was not covered by tests
} else if signatureID == "" && !plainText {
if resp, lErr := signature.ListAll(runtime, mailboxID); lErr == nil {
signatureID = signature.DefaultReplyID(resp.Usages, runtime.Str("from"))

Check warning on line 143 in shortcuts/mail/mail_forward.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_forward.go#L143

Added line #L143 was not covered by tests
} else {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: failed to fetch default signature: %v\n", lErr)
}
}
sigResult, sigErr := resolveSignature(ctx, runtime, mailboxID, signatureID, runtime.Str("from"))
if sigErr != nil {
return sigErr
Expand Down
17 changes: 17 additions & 0 deletions shortcuts/mail/mail_reply.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"github.com/larksuite/cli/shortcuts/common"
draftpkg "github.com/larksuite/cli/shortcuts/mail/draft"
"github.com/larksuite/cli/shortcuts/mail/emlbuilder"
"github.com/larksuite/cli/shortcuts/mail/signature"
)

// MailReply is the `+reply` shortcut: reply to the sender of a message,
Expand Down Expand Up @@ -42,6 +43,7 @@
{Name: "subject", Desc: "Optional. Override the auto-generated Re: subject. When set, the shortcut uses this value verbatim instead of prefixing the original subject."},
{Name: "template-id", Desc: "Optional. Apply a saved template by ID (decimal integer string) before composing. The template's body/to/cc/bcc/attachments are appended to the reply-derived values (no de-duplication; see warning in Execute output)."},
signatureFlag,
noSignatureFlag,
priorityFlag,
eventSummaryFlag, eventStartFlag, eventEndFlag, eventLocationFlag,
showLintDetailsFlag},
Expand Down Expand Up @@ -131,6 +133,21 @@

signatureID := runtime.Str("signature-id")
mailboxID := resolveComposeMailboxID(runtime)
noSignature := runtime.Bool("no-signature")
if noSignature {
if signatureID != "" {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: --signature-id ignored because --no-signature is set\n")

Check warning on line 140 in shortcuts/mail/mail_reply.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_reply.go#L138-L140

Added lines #L138 - L140 were not covered by tests
}
signatureID = ""

Check warning on line 142 in shortcuts/mail/mail_reply.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_reply.go#L142

Added line #L142 was not covered by tests
} else if signatureID == "" && !plainText {
if resp, lErr := signature.ListAll(runtime, mailboxID); lErr == nil {
signatureID = signature.DefaultReplyID(resp.Usages, runtime.Str("from"))

Check warning on line 145 in shortcuts/mail/mail_reply.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_reply.go#L145

Added line #L145 was not covered by tests
} else {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: failed to fetch default signature: %v\n", lErr)
}
}
sigResult, sigErr := resolveSignature(ctx, runtime, mailboxID, signatureID, runtime.Str("from"))
if sigErr != nil {
return sigErr
Expand Down
17 changes: 17 additions & 0 deletions shortcuts/mail/mail_reply_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"github.com/larksuite/cli/shortcuts/common"
draftpkg "github.com/larksuite/cli/shortcuts/mail/draft"
"github.com/larksuite/cli/shortcuts/mail/emlbuilder"
"github.com/larksuite/cli/shortcuts/mail/signature"
)

// MailReplyAll is the `+reply-all` shortcut: reply to the sender plus all
Expand Down Expand Up @@ -43,6 +44,7 @@
{Name: "subject", Desc: "Optional. Override the auto-generated Re: subject. When set, the shortcut uses this value verbatim instead of prefixing the original subject."},
{Name: "template-id", Desc: "Optional. Apply a saved template by ID (decimal integer string) before composing. The template's body/to/cc/bcc/attachments are appended to the reply-derived values (no de-duplication; see warning in Execute output)."},
signatureFlag,
noSignatureFlag,
priorityFlag,
eventSummaryFlag, eventStartFlag, eventEndFlag, eventLocationFlag,
showLintDetailsFlag},
Expand Down Expand Up @@ -133,6 +135,21 @@

signatureID := runtime.Str("signature-id")
mailboxID := resolveComposeMailboxID(runtime)
noSignature := runtime.Bool("no-signature")
if noSignature {
if signatureID != "" {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: --signature-id ignored because --no-signature is set\n")

Check warning on line 142 in shortcuts/mail/mail_reply_all.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_reply_all.go#L140-L142

Added lines #L140 - L142 were not covered by tests
}
signatureID = ""

Check warning on line 144 in shortcuts/mail/mail_reply_all.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_reply_all.go#L144

Added line #L144 was not covered by tests
} else if signatureID == "" && !plainText {
if resp, lErr := signature.ListAll(runtime, mailboxID); lErr == nil {
signatureID = signature.DefaultReplyID(resp.Usages, runtime.Str("from"))

Check warning on line 147 in shortcuts/mail/mail_reply_all.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_reply_all.go#L147

Added line #L147 was not covered by tests
} else {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: failed to fetch default signature: %v\n", lErr)
}
}
sigResult, sigErr := resolveSignature(ctx, runtime, mailboxID, signatureID, runtime.Str("from"))
if sigErr != nil {
return sigErr
Expand Down
17 changes: 17 additions & 0 deletions shortcuts/mail/mail_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"github.com/larksuite/cli/shortcuts/common"
draftpkg "github.com/larksuite/cli/shortcuts/mail/draft"
"github.com/larksuite/cli/shortcuts/mail/emlbuilder"
"github.com/larksuite/cli/shortcuts/mail/signature"
)

// MailSend is the `+send` shortcut: compose a new email and save it as a
Expand Down Expand Up @@ -40,6 +41,7 @@
{Name: "request-receipt", Type: "bool", Desc: "Request a read receipt (Message Disposition Notification, RFC 3798) addressed to the sender. Recipient mail clients may prompt the user, send automatically, or silently ignore — delivery of a receipt is not guaranteed."},
{Name: "template-id", Desc: "Optional. Apply a saved template by ID (decimal integer string) before composing. The template's subject/body/to/cc/bcc/attachments are merged with user-supplied flags (user flags win). Requires --as user."},
signatureFlag,
noSignatureFlag,
priorityFlag,
eventSummaryFlag, eventStartFlag, eventEndFlag, eventLocationFlag,
showLintDetailsFlag},
Expand Down Expand Up @@ -195,6 +197,21 @@
}
}

noSignature := runtime.Bool("no-signature")
if noSignature {
if signatureID != "" {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: --signature-id ignored because --no-signature is set\n")

Check warning on line 204 in shortcuts/mail/mail_send.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_send.go#L202-L204

Added lines #L202 - L204 were not covered by tests
}
signatureID = ""

Check warning on line 206 in shortcuts/mail/mail_send.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_send.go#L206

Added line #L206 was not covered by tests
} else if signatureID == "" && !plainText {
if resp, lErr := signature.ListAll(runtime, mailboxID); lErr == nil {
signatureID = signature.DefaultSendID(resp.Usages, senderEmail)

Check warning on line 209 in shortcuts/mail/mail_send.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/mail_send.go#L209

Added line #L209 was not covered by tests
} else {
fmt.Fprintf(runtime.IO().ErrOut,
"warning: failed to fetch default signature: %v\n", lErr)
}
}
sigResult, err := resolveSignature(ctx, runtime, mailboxID, signatureID, senderEmail)
if err != nil {
return err
Expand Down
37 changes: 37 additions & 0 deletions shortcuts/mail/signature/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import (
"encoding/json"
"net/url"
"strings"

"github.com/larksuite/cli/errs"
"github.com/larksuite/cli/shortcuts/common"
Expand Down Expand Up @@ -68,3 +69,39 @@
}
return nil, errs.NewValidationError(errs.SubtypeInvalidArgument, "signature not found: %s", signatureID)
}

// DefaultSendID returns the send_mail_signature_id for the given addr.
// Falls back to usages[0] if no entry matches, but returns "" when
// no default is configured (id empty or "0").
// Returns "" if usages is empty.
Comment on lines +73 to +76
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Docstring claims fallback to usages[0] but implementation returns "".

The docstring states "Falls back to usages[0] if no entry matches" but pickSignatureID returns "" when no address matches (line 106). The implementation appears correct based on caller expectations; the docstring should be updated.

📝 Suggested docstring fix
 // DefaultSendID returns the send_mail_signature_id for the given addr.
-// Falls back to usages[0] if no entry matches, but returns "" when
-// no default is configured (id empty or "0").
+// Returns "" when no entry matches or no default is configured
+// (id empty or "0").
 // Returns "" if usages is empty.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// DefaultSendID returns the send_mail_signature_id for the given addr.
// Falls back to usages[0] if no entry matches, but returns "" when
// no default is configured (id empty or "0").
// Returns "" if usages is empty.
// DefaultSendID returns the send_mail_signature_id for the given addr.
// Returns "" when no entry matches or no default is configured
// (id empty or "0").
// Returns "" if usages is empty.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/mail/signature/provider.go` around lines 73 - 76, Update the
docstring to match the actual behavior: state that DefaultSendID (and the helper
pickSignatureID) return an empty string when no address matches or when no
default is configured, and do not fall back to usages[0]; remove the incorrect
"Falls back to usages[0]" line and describe the actual fallback semantics
(return usages[0] only when configured, otherwise ""). Mention the functions
DefaultSendID and pickSignatureID by name so reviewers can find the updated
comment.

func DefaultSendID(usages []SignatureUsage, addr string) string {
return pickSignatureID(usages, addr, func(u SignatureUsage) string {
return u.SendMailSignatureID
})

Check warning on line 80 in shortcuts/mail/signature/provider.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/signature/provider.go#L77-L80

Added lines #L77 - L80 were not covered by tests
}

// DefaultReplyID returns the reply_signature_id for the given addr.
// Used by reply/reply-all/forward shortcuts.
// Returns "" if usages is empty or no default is configured.
func DefaultReplyID(usages []SignatureUsage, addr string) string {
return pickSignatureID(usages, addr, func(u SignatureUsage) string {
return u.ReplySignatureID
})

Check warning on line 89 in shortcuts/mail/signature/provider.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/signature/provider.go#L86-L89

Added lines #L86 - L89 were not covered by tests
}

func pickSignatureID(usages []SignatureUsage, addr string, pick func(SignatureUsage) string) string {
if len(usages) == 0 {
return ""

Check warning on line 94 in shortcuts/mail/signature/provider.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/signature/provider.go#L92-L94

Added lines #L92 - L94 were not covered by tests
}
laddr := strings.ToLower(strings.TrimSpace(addr))
for _, u := range usages {
if strings.ToLower(strings.TrimSpace(u.EmailAddress)) == laddr {
id := pick(u)
if id == "" || id == "0" {
return ""

Check warning on line 101 in shortcuts/mail/signature/provider.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/signature/provider.go#L96-L101

Added lines #L96 - L101 were not covered by tests
}
return id

Check warning on line 103 in shortcuts/mail/signature/provider.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/signature/provider.go#L103

Added line #L103 was not covered by tests
}
}
return ""

Check warning on line 106 in shortcuts/mail/signature/provider.go

View check run for this annotation

Codecov / codecov/patch

shortcuts/mail/signature/provider.go#L106

Added line #L106 was not covered by tests
}
7 changes: 7 additions & 0 deletions shortcuts/mail/signature_compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ var signatureFlag = common.Flag{
Desc: "Optional. Signature ID to append after body content. Run `mail +signature` to list available signatures.",
}

// noSignatureFlag is the common flag for --no-signature, shared by all compose shortcuts.
var noSignatureFlag = common.Flag{
Name: "no-signature",
Type: "bool",
Desc: "Do not append any signature to the email body (overrides automatic default signature).",
}

// signatureResult holds the pre-processed signature data ready for HTML injection.
type signatureResult struct {
ID string
Expand Down
1 change: 1 addition & 0 deletions skills/lark-mail/references/lark-mail-draft-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ lark-cli mail +draft-create --to alice@example.com --subject '测试' --body 'te
| `--attach <paths>` | 否 | 附件文件路径,多个用逗号分隔。相对路径。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
| `--inline <json>` | 否 | 高级用法:手动指定内嵌图片 CID 映射。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。仅在需要精确控制 CID 命名时使用此参数。格式:`'[{"cid":"mycid","file_path":"./logo.png"}]'`,在 body 中用 `<img src="cid:mycid">` 引用。不可与 `--plain-text` 同时使用 |
| `--signature-id <id>` | 否 | 签名 ID。附加邮箱签名到正文末尾。运行 `mail +signature` 查看可用签名。不可与 `--plain-text` 同时使用 |
| `--no-signature` | 否 | Do not append any signature to the email body (overrides automatic default signature). |
| `--priority <level>` | 否 | 邮件优先级:`high`、`normal`、`low`。省略或 `normal` 时不设置优先级 |
| `--request-receipt` | 否 | 请求已读回执(RFC 3798 Message Disposition Notification)。在草稿 EML 里写 `Disposition-Notification-To: <sender>` 头,发送时生效。收件人的邮件客户端可能弹出提示、自动发送或忽略——送达不保证 |
| `--event-summary <text>` | 否 | 日程标题。设置此参数即在邮件中嵌入日程邀请。需同时设置 `--event-start` 和 `--event-end` |
Expand Down
1 change: 1 addition & 0 deletions skills/lark-mail/references/lark-mail-forward.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ lark-cli mail +forward --message-id <邮件ID> --to alice@example.com --dry-run
| `--attach <paths>` | 否 | 附件文件路径,多个用逗号分隔,追加在原邮件附件之后。相对路径。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
| `--inline <json>` | 否 | 高级用法:手动指定内嵌图片 CID 映射。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。仅在需要精确控制 CID 命名时使用此参数。格式:`'[{"cid":"mycid","file_path":"./logo.png"}]'`,在 body 中用 `<img src="cid:mycid">` 引用。不可与 `--plain-text` 同时使用 |
| `--signature-id <id>` | 否 | 签名 ID。附加邮箱签名到转发正文与引用块之间。运行 `mail +signature` 查看可用签名。不可与 `--plain-text` 同时使用 |
| `--no-signature` | 否 | Do not append any signature to the email body (overrides automatic default signature). |
| `--priority <level>` | 否 | 邮件优先级:`high`、`normal`、`low`。省略或 `normal` 时不设置优先级 |
| `--event-summary <text>` | 否 | 日程标题。设置此参数即在邮件中嵌入日程邀请。需同时设置 `--event-start` 和 `--event-end` |
| `--event-start <time>` | 条件必填 | 日程开始时间(ISO 8601) |
Expand Down
1 change: 1 addition & 0 deletions skills/lark-mail/references/lark-mail-reply-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ lark-cli mail +reply-all --message-id <邮件ID> --body '测试' --dry-run
| `--attach <paths>` | 否 | 附件文件路径,多个用逗号分隔。相对路径。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
| `--inline <json>` | 否 | 高级用法:手动指定内嵌图片 CID 映射。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。仅在需要精确控制 CID 命名时使用此参数。格式:`'[{"cid":"mycid","file_path":"./logo.png"}]'`,在 body 中用 `<img src="cid:mycid">` 引用。不可与 `--plain-text` 同时使用 |
| `--signature-id <id>` | 否 | 签名 ID。附加邮箱签名到回复正文与引用块之间。运行 `mail +signature` 查看可用签名。不可与 `--plain-text` 同时使用 |
| `--no-signature` | 否 | Do not append any signature to the email body (overrides automatic default signature). |
| `--priority <level>` | 否 | 邮件优先级:`high`、`normal`、`low`。省略或 `normal` 时不设置优先级 |
| `--event-summary <text>` | 否 | 日程标题。设置此参数即在邮件中嵌入日程邀请。需同时设置 `--event-start` 和 `--event-end` |
| `--event-start <time>` | 条件必填 | 日程开始时间(ISO 8601) |
Expand Down
1 change: 1 addition & 0 deletions skills/lark-mail/references/lark-mail-reply.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ lark-cli mail +reply --message-id <邮件ID> --body '<p>测试</p>' --dry-run
| `--attach <paths>` | 否 | 附件文件路径,多个用逗号分隔。相对路径。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
| `--inline <json>` | 否 | 高级用法:手动指定内嵌图片 CID 映射。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。仅在需要精确控制 CID 命名时使用此参数。格式:`'[{"cid":"mycid","file_path":"./logo.png"}]'`,在 body 中用 `<img src="cid:mycid">` 引用。不可与 `--plain-text` 同时使用 |
| `--signature-id <id>` | 否 | 签名 ID。附加邮箱签名到回复正文与引用块之间。运行 `mail +signature` 查看可用签名。不可与 `--plain-text` 同时使用 |
| `--no-signature` | 否 | Do not append any signature to the email body (overrides automatic default signature). |
| `--priority <level>` | 否 | 邮件优先级:`high`、`normal`、`low`。省略或 `normal` 时不设置优先级 |
| `--event-summary <text>` | 否 | 日程标题。设置此参数即在邮件中嵌入日程邀请。需同时设置 `--event-start` 和 `--event-end` |
| `--event-start <time>` | 条件必填 | 日程开始时间(ISO 8601) |
Expand Down
1 change: 1 addition & 0 deletions skills/lark-mail/references/lark-mail-send.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ lark-cli mail +send --to alice@example.com --subject '测试' --body '<p>test</p
| `--attach <paths>` | 否 | 附件文件路径,多个用逗号分隔。相对路径。当附件导致 EML 总大小超过 25 MB 时,超出部分自动上传为超大附件(HTML 邮件插入下载卡片,纯文本邮件追加下载链接),单个文件上限 3 GB |
| `--inline <json>` | 否 | 高级用法:手动指定内嵌图片 CID 映射。推荐直接在 `--body` 中使用 `<img src="./path" />`(自动解析)。仅在需要精确控制 CID 命名时使用此参数。格式:`'[{"cid":"mycid","file_path":"./logo.png"}]'`,在 body 中用 `<img src="cid:mycid">` 引用。不可与 `--plain-text` 同时使用 |
| `--signature-id <id>` | 否 | 签名 ID。附加邮箱签名到正文末尾。运行 `mail +signature` 查看可用签名。不可与 `--plain-text` 同时使用 |
| `--no-signature` | 否 | Do not append any signature to the email body (overrides automatic default signature). |
| `--priority <level>` | 否 | 邮件优先级:`high`、`normal`、`low`。省略或 `normal` 时不设置优先级 |
| `--event-summary <text>` | 否 | 日程标题。设置此参数即在邮件中嵌入日程邀请(text/calendar)。需同时设置 `--event-start` 和 `--event-end` |
| `--event-start <time>` | 条件必填 | 日程开始时间(ISO 8601,如 `2026-04-20T14:00+08:00`) |
Expand Down
Loading