rpremraj / mailR

A utility to send emails from the R programming environment
http://rpremraj.github.io/mailR/
190 stars 57 forks source link

Request for the ability to send mail without 'to' parameter so that 'cc' and/or 'bcc' can take over #88

Open sanjidnet opened 4 years ago

sanjidnet commented 4 years ago

It seems that in the send.mail function, to ends up being a default parameter. This is because .valid.email applies on to whether or not to exists. It's useful for it to not be the case when mails are sent to bcc recipients only.

Perhaps the following amendment should address this issue?

== if("to" %in% names(dots))
== {
    if(.valid.email(to))
        sapply(to, email$addTo)
== }