Loading...
Loading...
Send emails through SMTP with optional local attachments and optional IMAP APPEND sync to Sent mailbox. Use when tasks need reliable outbound email delivery, attachment sending, SMTP connectivity checks, or cross-client sent-mail visibility (for example appending to "Sent Items" after SMTP send).
npx skill4agent add tiangong-ai/skills email-smtp-sendreferences/env.mdassets/config.example.envimapclientpython3 scripts/smtp_send.py check-configpython3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "SMTP test" \
--body "Hello from email-smtp-send"python3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "Package delivery" \
--body "See attachments." \
--attach ./report.pdf \
--attach ./appendix.xlsxpython3 scripts/smtp_send.py send \
--to recipient@example.com \
--subject "Synced send" \
--body "This message will be appended to Sent Items." \
--sync-sent \
--sent-mailbox "Sent Items"check-configsendtype=statusevent=smtp_sentmessage_idattachment_countattachments[]sent_syncenabledrequiredappendedsendtype=errorevent=smtp_send_invalid_argsevent=smtp_send_failedevent=smtp_sent_sync_failedsend --tosend --ccsend --bccsend --subjectsend --bodysend --content-typeplainhtmlsend --fromsend --attachsend --max-attachment-bytessend --message-idsend --in-reply-tosend --referencessend --sync-sent|--no-sync-sentsend --sent-mailboxsend --sent-flags\Seensend --sent-sync-requiredSMTP_HOSTSMTP_PORTSMTP_SSLSMTP_STARTTLSSMTP_USERNAMESMTP_PASSWORDSMTP_FROMSMTP_CONNECT_TIMEOUTSMTP_SUBJECTSMTP_BODYSMTP_CONTENT_TYPESMTP_MAX_ATTACHMENT_BYTESSMTP_SYNC_SENTSMTP_SYNC_SENT_REQUIREDSMTP_SENT_IMAP_HOSTSMTP_SENT_IMAP_PORTSMTP_SENT_IMAP_SSLSMTP_SENT_IMAP_USERNAMESMTP_SENT_IMAP_PASSWORDSMTP_SENT_IMAP_MAILBOXSMTP_SENT_IMAP_FLAGSSMTP_SENT_IMAP_CONNECT_TIMEOUTIMAP_HOSTIMAP_PORTIMAP_SSLIMAP_USERNAMEIMAP_PASSWORDIMAP_CONNECT_TIMEOUTimapclientpython3 -m pip install imapclient21--sent-sync-requiredSMTP_SYNC_SENT_REQUIRED=true1references/env.mdassets/config.example.envscripts/smtp_send.py