Em teoria, o seguinte deve funcionar (creditos: D A James, 2003). Necessario instalar o RDCOMClient ( <span class="Apple-style-span" style="font-family: monospace; white-space: pre; background-color: rgb(255, 255, 255); font-size: medium; "><a href="http://www.omegahat.org/RDCOMClient">http://www.omegahat.org/RDCOMClient</a></span><span class="Apple-style-span" style="font-family: monospace; white-space: pre; background-color: rgb(255, 255, 255); font-size: medium; "> ). Como nao uso Windows, nao posso testar.. Quem quiser testar, sinta-se livre para corrigir o codigo e postar os resultados. :)</span><div>
<font class="Apple-style-span" face="monospace" size="3"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></div><div><font class="Apple-style-span" face="monospace" size="3"><span class="Apple-style-span" style="white-space: pre;">b<br>
</span></font><div><div><span class="Apple-style-span" style="font-family: Times; background-color: rgb(255, 255, 255); font-size: medium; "><pre>sendEmail <- function(ema, name, subject, msgBody, deliverNow = TRUE){
require(RDCOMClient)
ema <- paste("SMPT:", ema, sep="") ## prepend protocol to address
## create an e-mail session
session <- COMCreate("Mapi.Session")
session$Logon()
## add a message to the outbox collection of messages
outbox <- session[["Outbox"]]
msg <- outbox[["Messages"]]$Add(subject, msgBody)
## add recipient's name (TODO: addMultiple() or loop, if many recipients)
msg[["Recipients"]]$Add(name, ema)
msg$Send()
if(deliverNow)
msg$DeliverNow()
session$Logoff() ## wrap up
}
</pre></span><span class="Apple-style-span" style="font-family: Times; background-color: rgb(255, 255, 255); font-size: medium; "><pre><i>sendEmail(ema="destinatario@algum.email",
</i> name="Nome Destinatario",
subject="Titulo da msg"
msgBody="Corpo msg")
<br></pre></span></div></div></div>