---json { "page_id": "8y09xaqtf4f28j2vkpbmf" } --- ====== SendMail Operation ====== ===== About ===== ''sendMail'' is an [[:docs:flow:intermediate|intermediate operation]] that sends one or several emails to a [[docs:system:smtp|SMTP server]]. ===== HowTo ===== * [[:howto:email:mailing_list|]] * [[howto:email:send_resources|]] ===== Arguments ===== ^ Argument ^ Default ^ Description ^ | [[docs:flow:template_data_uri|target-uri]] | ''@smtp'' | the smtp server to use to send the email (by default, the local smtp server without any authentication) | | ''to'' | ''to'' property of the smtp connection | the receiver internet email addresses | | ''from'' | ''from'' property of the smtp connection \\ if not found ''user@host'' | the sender email address | | ''cc'' | ''cc'' property of the smtp connection | the carbon copy email addresses (separated by a ;) | | ''bcc'' | ''bcc'' property of the smtp connection | the blind carbon copy email addresses (separated by a ;) | | ''subject'' | the [[docs:resource:logical_name|logical name]] of the resource | the email subject | | ''txt'' | | the text body of the email | | ''html'' | | the html body of the email | | ''body-type'' | ''['html','txt']'' | the resources type seen as email body (ie ''html'' and ''txt'' file are seen as email body and not attachment) | | [[:docs:flow:granularity|granularity]] | ''resource'' | with the value: \\ - ''resource'': one email is send with all resources attached \\ - ''record'' - an email is send by record (mailinglist) | | ''log-target-uri'' | A [[docs:flow:template_data_uri|target-uri]] | the location of the logs that stores the emails sent (By default, the table ''smtp'' in the [[:docs:connection:log|log]]). You can use this parameter to point to a table in your database to exclude email from a list in your selection. | ==== Record run ==== When running the [[:howto:email:mailing_list|send operation by record]], the send operation except the following [[:docs:resource:column|columns]]: ^ Column Name ^ Optionality ^ Default ^ Description ^ | ''to'' | In [[docs:common:environment|production]], ''mandatory'', \\ in other environment, the ''to'' property of the smtp connection is used || The ''to'' address(es) | | ''to_names'' | yes | ''from'' property of the smtp connection | The ''to'' address names | | ''from'' | yes | ''from'' property of the smtp connection | The ''from'' address (only one) | | ''from_name'' | yes | The name of the ''from'' address | The ''from'' address name | | ''cc'' | yes | The ''cc'' property of the smtp connection | The ''cc'' address (separated by a ;) | | ''cc_names'' | yes | The ''cc_names'' property of the smtp connection | The names of the ''cc'' address | | ''bcc'' | yes | The ''bcc'' property of the smtp connection | The ''bcc'' address (separated by a ;) | | ''bcc_names'' | yes | The ''bcc_names'' property of the smtp connection | The names of the ''bcc'' address | | ''subject'' | yes | [[docs:resource:logical_name|logical name]] of the resource and record id | | ''txt'' | Mandatory if html is not present | none | The email text body | | ''html'' | Mandatory if txt is not present | none | The email html body | No attachements can be sent for now in a record run.