Skip to content

Commit

Permalink
Merge pull request #68 from Rapporteket/areedv-patch-1
Browse files Browse the repository at this point in the history
may work with just one tiny space?
  • Loading branch information
areedv authored Apr 18, 2021
2 parents b757511 + 47c445c commit a57bd81
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rapbase
Type: Package
Title: Base Functions and Resources for Rapporteket
Version: 1.13.2
Version: 1.13.3
Authors@R: c(
person(given = "Are",
family = "Edvardsen",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# rapbase 1.13.3 (#68)

* Minor adjustment to email subject (header field) format

# rapbase 1.13.2 (#66)

* Fixed email encoded subject (header field) split
Expand Down
4 changes: 2 additions & 2 deletions R/sendEmail.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ sendEmail <- function(conf, to, subject, text, attFile = NULL) {
# escape spaces (e.g. when full name is added to <email>)
to <- gsub(" ", "\\ ", to, fixed = TRUE)
# Subject is a header field, hence non-ascii to be base64 encoded
# Header lines must be 76 chars or less and split by a newline
# Header lines must be 76 chars or less and split by a space
# and contain consistent encoded-word(s)
subject <- charToRaw(subject)
subject <- base64enc::base64encode(subject, linewidth = 63)
subject <- paste(paste0(charset, enc, subject, headPost),
collapse = "\r\n")
collapse = " ")

if (is.null(attFile)) {
body <- list(text)
Expand Down

0 comments on commit a57bd81

Please sign in to comment.