cr_buildstep_mailgun {googleCloudRunner} | R Documentation |
Send an email in a Cloud Build step via MailGun.org
Description
This uses Mailgun to send emails. It calls an R script that posts the message to MailGuns API.
Usage
cr_buildstep_mailgun(
message,
to,
subject,
from,
mailgun_url = "$_MAILGUN_URL",
mailgun_key = "$_MAILGUN_KEY",
...
)
Arguments
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 |
Details
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.
See Also
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()
Examples
cr_project_set("my-project")
cr_bucket_set("my-bucket")
mailgun_url <- "https://api.mailgun.net/v3/sandboxXXX.mailgun.org"
mailgun_key <- "key-XXXX"
## Not run:
# 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
)
)
)
## End(Not run)