Functions to influence message delivery speed and importance.

priority(msg, priority = NULL)

importance(msg, importance = NULL)

Arguments

msg

A message object.

priority

Priority level. One of "non-urgent", "normal", or "urgent".

importance

Importance level. One of "low", "normal", or "high".

Value

A message object.

Details

The priority() function adds the Priority header field which gives a hint to influence transmission speed and delivery. Valid values are "non-urgent", "normal", and "urgent". The non-standard X-Priority header field is similar, for which valid values are 1 (Highest), 2 (High), 3 (Normal, the default), 4 (Low), and 5 (Lowest).

The importance() function adds the Importance header field, which gives a hint to the message recipient about how important the message is. Does not influence delivery speed.

Examples

# How rapidly does the message need to be delivered?
#
envelope() %>%
  subject("Deliver this immediately!") %>%
  priority("urgent")

envelope(priority = "non-urgent") %>%
  subject("No rush with this.")

# How much attention should be paid by recipient?
#
envelope() %>%
  subject("Read this immediately!") %>%
  importance("high")

envelope(importance = "low") %>%
  subject("Not important at all. Just delete.")