Send email: Difference between revisions
Content added Content deleted
m (→{{header|R}}: dead link, replaced with a CRAN package) |
(→{{header|R}}: +COM) |
||
Line 1,146: | Line 1,146: | ||
=={{header|R}}== |
=={{header|R}}== |
||
R does not have a built-in facility for sending emails though there is a package for this on CRAN: '''[https://cran.r-project.org/web/packages/mail/ mail]'''. |
R does not have a built-in facility for sending emails though there is a package for this on CRAN: '''[https://cran.r-project.org/web/packages/mail/ mail]'''. |
||
===Windows=== |
|||
Using Outlook COM server with the '''[http://www.omegahat.net/RDCOMClient/ RDCOMClient]''' package. |
|||
<lang r>library(RDCOMClient) |
|||
send.mail <- function(to, title, body) { |
|||
olMailItem <- 0 |
|||
ol <- COMCreate("Outlook.Application") |
|||
msg <- ol$CreateItem(olMailItem) |
|||
msg[["To"]] <- to |
|||
msg[["Subject"]] <- title |
|||
msg[["Body"]] <- body |
|||
msg$Send() |
|||
ol$Quit() |
|||
} |
|||
send.mail("somebody@somewhere", "Title", "Hello")</lang> |
|||
=={{header|Racket}}== |
=={{header|Racket}}== |