mail

Collection: community.general

Full Name: parallax.community.general.mail

Aliases: community.general.mail, mail

Synopsis

Manage mail

Parameters

NameTypeRequiredDefaultDescription
hoststringlocalhostSMTP server hostname
portint25SMTP server port
tostringyesRecipient email address(es), comma-separated
ccstringCC email address(es), comma-separated
bccstringBCC email address(es), comma-separated
subjectstringyesEmail subject line
bodystringEmail body content
fromstringrootSender email address
securestringtrySecurity mode (always, never, try, starttls)
usernamestringSMTP authentication username
passwordstringSMTP authentication password
headersstringAdditional email headers as key=value pairs
charsetstringutf-8Character set for the email
subtypestringplainMIME subtype (plain, html)
timeoutint20SMTP connection timeout in seconds
attachstringFile path(s) to attach, comma-separated

Example

- name: Example mail task
  mail:
    to: <your_to>
    subject: <your_subject>