smtp-send
Send emails via SMTP with support for plain text, HTML, and attachments. Use when the user asks to send an email, email someone, or compose and send a message. Supports single recipients and can include file attachments. Works with Gmail, Outlook, Yahoo, QQ Mail, 163 Mail, and
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Send emails via SMTP with support for plain text, HTML, and attachments. Use when the user asks to send an email, email someone, or compose and send a message. Supports single recipients and can include file attachments. Works with Gmail, Outlook, Yahoo, QQ Mail, 163 Mail, and any SMTP server.
How to use
Przygotuj plik konfiguracyjny ~/.smtp_config w formacie JSON. Możesz wybrać metodę Resend API (dodaj resend_api_key i resend_from) lub SMTP (dodaj host, port, user, password, from i use_ssl). Jeśli chcesz fallback, umieść oba zestawy parametrów w jednym pliku. Po utworzeniu pliku ustaw uprawnienia: chmod 600 ~/.smtp_config.
Aby wysłać prostą wiadomość tekstową, użyj komendy z parametrami --to (adres odbiorcy), --subject (temat) i --body (treść). Na przykład: python3 scripts/send_email.py --to recipient@example.com --subject "Spotkanie jutro" --body "Cześć, spotkajmy się o 14:00".
Jeśli chcesz wysłać wiadomość w formacie HTML, dodaj flagę --html do komendy. Treść w parametrze --body powinna zawierać tagi HTML, np.
Raport
Tutaj są aktualizacje...
.Aby dołączyć pliki, dodaj parametr --attachments z listą nazw plików oddzielonych przecinkami. Przykład: python3 scripts/send_email.py --to recipient@example.com --subject "Dokumenty" --body "Załączone pliki" --attachments raport.pdf,dane.csv.
Jeśli masz skonfigurowane oba dostawcy (Resend i SMTP), umiejętność automatycznie spróbuje Resend najpierw, a w przypadku błędu przełączy się na SMTP. Możesz też wymusić konkretnego dostawcę flagą --provider resend lub --provider smtp.