[R] Sending carbon copy mails from R
S Ellison
S.Ellison at LGCGroup.com
Mon Jul 15 12:55:55 CEST 2013
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Alok Jadhav
> updated code pasted here. So I guess CC is not an option at
> all? In that case is there any other package that would be useful?
I'm guessing here (based on experience of PHP's sendmail interface), but CC is just another header field for sendmail. The package sendmailR has a headers= argument to its sendmail function that accepts 'other headers' and therefore ought to accept CC addresses. Since that argument's a list and the sendmailR code simply pastes names and list contents before sending, I'd guess that something of the form list(CC=cc.recipient at example.com) might work, though the documentation is not very helpful on the format of the list.
S Ellison
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Alok Jadhav
> Sent: 12 July 2013 02:49
> To: r-help at r-project.org
> Subject: Re: [R] Sending carbon copy mails from R
>
> updated code pasted here. So I guess CC is not an option at
> all? In that case is there any other package that would be useful?
>
> require(sendmailR)
> to <- c("v.n at abc.com")
> header <- list(cc=c("a.j at abc.com"))
> x <- sendmail("toto at abc.com", to, "test", "testing",
> header=header,control=list(smtpServer=server,verbose=TRUE))
> << 220 equity.xyz.com ESMTP Sendmail 8.11.7p1+Sun/8.11.7;
> Thu, 11 Jul 2013
> 21:31:43 -0400 (EDT)
> >> HELO HKD03836654
> << 250 equity.xyz.com Hello HKD03836654.gbl.ad.net
> [169.34.175.142], pleased to meet you
> >> MAIL FROM: toto at abc.com
> << 250 2.1.0 toto at abc.com... Sender ok
> >> RCPT TO: v.n at abc.com
> << 250 2.1.5 v.n at abc.com... Recipient ok
> >> DATA
> << 354 Enter mail, end with "." on a line by itself
> >> <message data>
> << 250 2.0.0 r6C1Vh101169 Message accepted for delivery
> >> QUIT
> << 221 2.0.0 equity.csfb.com closing connection
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Sending-carbon-copy-mails-from-R
> -tp4671153p4671376.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
More information about the R-help
mailing list