Thanks prof. Ripley. I looked into create.post function. Unfortunately this is not useful in my case. I want to send emails programmatically from a server machine (error notifications etc.) I am able to send emails from my workstation using Outlook com object without any issues. However, on server machine I don't have access to outlook object (or any other email client). Hence the need to explore SMTP clients to be able to send mails from server.
Regards, Alok -----Original Message----- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Friday, July 12, 2013 1:41 PM To: Jadhav, Alok Cc: r-help@r-project.org Subject: Re: [R] Sending carbon copy mails from R Note that sendmailR is not 'from R'. There are other possibilities, and I use create.post() from R itself, modified as I need. On 12/07/2013 02:48, Alok Jadhav wrote: > 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...@abc.com") > header <- list(cc=c("a...@abc.com")) > x <- sendmail("t...@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: t...@abc.com > << 250 2.1.0 t...@abc.com... Sender ok >>> RCPT TO: v...@abc.com > << 250 2.1.5 v...@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-tp4671153 p4671376.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. > -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 =============================================================================== Please access the attached hyperlink for an important el...{{dropped:4}} ______________________________________________ R-help@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.