Skip to content

v0.3.0

Compare
Choose a tag to compare
@rich-iannone rich-iannone released this 22 Nov 19:16
· 102 commits to master since this release

The blastula package has transitioned to using the curl package for SMTP mailing.

There are new functions for integrating blastula with R Markdown publishing on the RStudio Connect service. And sophisticated email bodies can be generated with HTML Blocks.

Breaking Changes

  • send_email_out() has been removed; the smtp_send() function is its replacement for sending email through an SMTP server

  • The revised smtp_send() function internally uses curl::send_mail() to send RFC2822 email message that blastula now independently generates; now, there is no need to download third-party binaries to send via SMTP

  • The smtp_send() no longer offers text interpolation in { } (which was provided by glue::glue()) since this poses a security risk; email strings can be precomposed using glue::glue() independently, or, by using c(), paste()/paste0.

  • If an email message string contains Markdown text or HTML fragments, the md() function must be used to perform rendering

  • The create_email_creds_file() function has been removed in favor of a suite of functions for storing SMTP configuration info and credentials (create_smtp_creds_file(), create_smtp_creds_key()); the following credentials helper functions are available for retrieving or directly specifying configuration and credentials during sending: creds_file(), creds_key(), creds_anonymous(), and creds()

  • The preview_email() function has been removed as email objects created by compose_email() now have a print method

  • The .preheader_text argument in compose_email() has been removed because of display issues in certain email clients

New Features

  • Added functions useful for scheduled email sending in RStudio Connect during publication of R Markdown documents: render_email(), render_connect_email(), attach_connect_email(), blastula_email(), suppress_scheduled_email(), prepare_rsc_example_files()

  • The compose_email() function now has a header argument, allowing for content to populate the area above the body

  • Images embedded in email messages by using add_image() are now properly encoded as Base64 in the outgoing message; more MIME types are supported thanks to functions provided by the mime package

  • The new add_imgur_image() function allows us to deploy a local image to Imgur and retrieve the image tag (all in one step); this is useful if you want to use external images in an email message

  • We can now build sophisticated email messages with HTML blocks. With these responsive, higher-level components, we can create compose elements within the header, body, and footer components. The functions now available for this system are: blocks(), block_title(), block_text(), block_spacer(), block_articles(), and block_social_links(). Two useful subcomponent functions are article() and social_link().

Notes

  • Functions from the getPass package are used internally to ask for a password whenever necessary during an interactive session

  • Functions from the keyring package are used internally to aid in the storage and retrieval of STMP config/credentials information in the system-wide key-value store (which is cross platform)