You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用R语言RDCOMClient包为Outlook发送的邮件添加收件人提醒

实现方案

该需求完全可以实现,Outlook COM接口原生支持为邮件添加提醒/跟进标记功能,只需在现有代码的邮件参数配置段添加对应的属性配置即可。

修改后的完整代码

library(RDCOMClient)
mail_fun <- function(email, name, number) {
  Outlook <- COMCreate("Outlook.Application")
  Email = Outlook$CreateItem(0)
  # 基础邮件参数
  #Email[["sentonbehalfofname"]] = ""
  Email[["to"]] = email
  Email[["cc"]] = ""
  Email[["bcc"]] = ""
  Email[["importance"]] = "2"
  Email[["readreceiptrequested"]] = FALSE
  Email[["originatordeliveryreportrequested"]] = FALSE
  Email[["subject"]] = paste0("Confirm your Telia SIM card delivery with the phone number: ", number)
  Email[["Body"]] = paste0("Dear ", name,",", "\n", "\n", "I would like to ask you for a confirmation that a new Telia SIM card with the phone number: ", number, " was delivered to you.", 
                           " Your confirmation is very important for a successful porting from H3Gi to Telia. The porting is planned for September 14th 2021.", "\n",
                           "In case you have not received the SIM card yet, please let us know your delivery address and we will send you a new SIM card.",
                           "\n", "\n", "Thank you for your cooperation.", "\n", "\n", "Best regards,", "\n", "Jaroslav Kotrba")
  # --------------------------新增提醒功能配置--------------------------
  Email[["FlagRequest"]] = "请确认Telia SIM卡收件情况" # 提醒显示的自定义文本
  Email[["ReminderSet"]] = TRUE # 开启邮件提醒功能
  Email[["ReminderTime"]] = "2021-09-11 09:00:00" # 提醒弹窗触发时间,可按需调整
  Email[["FlagStatus"]] = 2 # 标记为待跟进状态,匹配Outlook客户端标记功能
  # -------------------------------------------------------------------
  # 发送邮件
  Email$Send()
}

# 批量发送
mapply(mail_fun, DK$email, DK$name, DK$number)

参数说明

  • FlagRequest:自定义提醒的展示文本,收件人收到邮件后可直接在邮件列表看到该提示
  • ReminderSet:逻辑值,设为TRUE即可启用该邮件的提醒功能
  • ReminderTime:指定提醒弹窗的触发时间,按YYYY-MM-DD HH:MM:SS格式填写你需要的时间即可
  • FlagStatus = 2:对应Outlook客户端的「需跟进」标记状态,和你提供的操作界面功能完全匹配

注意:该提醒功能基于Outlook协议实现,仅当收件人使用Outlook客户端/网页版收信时可正常触发,第三方邮件客户端可能无法识别该类标记属性。

操作界面参考

操作界面参考

内容的提问来源于stack exchange,提问作者Jaroslav Kotrba

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.07 09:48:03