R/buildsteps_templates.R
cr_buildstep_mailgun.Rd
This uses Mailgun to send emails. It calls an R script that posts the message to MailGuns API.
cr_buildstep_mailgun( message, to, subject, from, mailgun_url = "$_MAILGUN_URL", mailgun_key = "$_MAILGUN_KEY", ... )
message | The message markdown |
---|---|
to | to email |
subject | subject email |
from | from email |
mailgun_url | The Mailgun API base URL. Default assumes you set this in Build substitution macros |
mailgun_key | The Mailgun API key. Default assumes you set this in Build substitution macros |
... | Other arguments passed to cr_buildstep_r |
Requires an account at Mailgun: https://mailgun.com Pre-verification you can only send to a whitelist of emails you configure - see Mailgun website for details.
Other Cloud Buildsteps:
cr_buildstep_bash()
,
cr_buildstep_decrypt()
,
cr_buildstep_df()
,
cr_buildstep_docker()
,
cr_buildstep_edit()
,
cr_buildstep_extract()
,
cr_buildstep_gcloud()
,
cr_buildstep_gitsetup()
,
cr_buildstep_nginx_setup()
,
cr_buildstep_pkgdown()
,
cr_buildstep_run()
,
cr_buildstep_r()
,
cr_buildstep_secret()
,
cr_buildstep_slack()
,
cr_buildstep()
#>#> [1] "my-project"#> ℹ 2021-03-19 12:27:04 > Bucket set to my-bucket#> [1] "my-bucket"mailgun_url <- "https://api.mailgun.net/v3/sandboxXXX.mailgun.org" mailgun_key <- "key-XXXX" if (FALSE) { # assumes you have verified the email cr_build( cr_build_yaml(steps = cr_buildstep_mailgun( "Hello from Cloud Build", to = "me@verfied_email.com", subject = "Hello", from = "googleCloudRunner@example.com"), substitutions = list( `_MAILGUN_URL` = mailgun_url, `_MAILGUN_KEY` = mailgun_key) )) }