次のコードを使用してパッケージを使用してRからメールを送信しようとしてsendmailR
いますが、残念ながら失敗します:
## Set mail contents
from <- sprintf('<sendmailR@%s>', Sys.info()[4])
to <- '<slackline@gmail.com>'
subject <- 'Feeding Plots'
body <- list('Latest feeding graph', mime_part(feeding.plot,
name = "feeding"))
## Set control parameters
control <- sendmail_options(verboseShow = TRUE,
smtpServer ="smtp.gmail.com",
smtpPort = 587,
smtpSTARTTLS = '',
blocking = FALSE)
sendmail(from,
to,
subject,
msg = body,
control = control,
headers)
<< 220 mx.google.com ESMTP xt1sm884721wjb.17 - gsmtp
>> HELO kimura
<< 250 mx.google.com at your service
>> MAIL FROM: <sendmailR@kimura>
<< 530 5.7.0 Must issue a STARTTLS command first. xt1sm884721wjb.17 - gsmtp
Error in wait_for(code) :
SMTP Error: 5.7.0 Must issue a STARTTLS command first. xt1sm884721wjb.17 - gsmtp
sendmailR のマニュアルSTARTTLS
には、追加の引数を渡すことができることは示されていますが、構成方法については言及されていません。そのため、他のスレッド ( hereおよびheresmtpSTARTLS = ''
) で言及されている内容に基づいてオプションを含めました。私は引数をいじってみましたが、喜びはありませんでした。smtpSTARTTLS
TRUE
ドキュメントまたはソリューションへのポインタは大歓迎です。
ありがとう