示例代码:
library(mailR)
path='/Users/me/Downloads/file.xlsx'
send.mail(from = sender,
to = recipients,
subject = 'email with hyperlink',
body = c(path),
html = FALSE,
inline = FALSE,
smtp = list(host.name = a, port = b,
user.name = c,
passwd = d, ssl = TRUE),
authenticate = TRUE,
send = TRUE)
是否可以将路径显示为电子邮件正文中的超链接?
答案 0 :(得分:1)
使用您的示例:
library(mailR)
path="file:///C:\\Users\\me\\Downloads\\file.xlsx"
send.mail(from = sender,
to = recipients,
subject = 'email with hyperlink',
body = path,
html = FALSE,
inline = FALSE,
smtp = list(host.name = a, port = b,
user.name = c,
passwd = d, ssl = TRUE),
authenticate = TRUE,
send = TRUE)