I am sending emails with emayili, a great package BTW.
I want to send replies to my previous emails. For example, I send an email. Later, I want to reply to that specific email.
I know that the package has already provided two functions (which I don't really know the difference between them): inreplyto and references.
These functions require a message ID (msgid
) as their argument to identify the message that they are replying to.
So my question is how to get that message ID? Does emayili return such an ID when sending an email?
My sample code is:
message_content <- envelope(
to = "Reciever@gmail.com" %>% address(display = "MR. Reciever"),
from = "Sender@gmail.com" %>% address(display = "MR. Sender"),
subject = "email_subject",
importance = "high",
priority = "urgent"
) %>%
return_path("Sender@gmail.com" %>% address(display = "MR. Sender"))
message_content <- message_content %>%
text("Hello!")
smtp <- gmail(
username = "Sender@gmail.com",
password = "**********"
)
smtp(message_content, verbose = F)
Andrew (datawookie) has skillfully resolved the issue. You can find our discussion on GitHub issues and refer to his insightful blog post.
The solution involves three key components:
Message-ID
: Andrew swiftly added this feature to {emayili}. Now you can generate random ID sequences for future reference—likely how email clients recognize related messages.In-Reply-To
and References
).Don't miss Andrew's informative blog post!