Skip to content

add_attachment() should support multiple files at once #239

@shrektan

Description

@shrektan

This example code should explains what I mean well:

library(blastula)
files <- c(tempfile(fileext = ".txt"), tempfile(fileext = ".txt"))
writeLines("file1", files[1])
writeLines("file2", files[2])
email <- compose_email("test")
out1 <- add_attachment(email, files)$attachments
out2 <- local({
  email <- add_attachment(email, files[1])
  email <- add_attachment(email, files[2])
  email$attachments
})

out1 and out2 should generate the same result. However, at present, smtp_send() will fail when out1 is used for the email argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions