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",
...
)
The message markdown
to email
subject email
from email
The Mailgun API base URL. Default assumes you set this in Build substitution macros
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_packagetests()
,
cr_buildstep_pkgdown()
,
cr_buildstep_run()
,
cr_buildstep_r()
,
cr_buildstep_secret()
,
cr_buildstep_slack()
,
cr_buildstep_targets()
,
cr_buildstep()
cr_project_set("my-project")
#> ℹ 2022-03-26 19:55:50 > ProjectId set to my-project
#> [1] "my-project"
cr_bucket_set("my-bucket")
#> ℹ 2022-03-26 19:55:50 > 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
)
)
)
}