验证电子邮件平台VBA
想象一下,您有一个自动发送电子邮件的 vba 代码,但您不知道接收您电子邮件的人使用的是 Outlook 还是 Notes。我想要一个代码来验证此人是否有 Outlook 或 Notes。
如果“此人有 Outlook”则 ... 如果“人有笔记”那么 ... 别的 “无法发送” 结束的话
谢谢!
Imagine that you have a vba code to send emails automatically but you don't know if the person who will receive your email uses Outlook or Notes. I want a code that verify if the person has Outlook or Notes.
If 'person has Outlook' then
...
If 'person has Notes' then
...
Else
"Impossible to send"
end if
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
无法提前检测接收邮件客户端。无论如何,许多用户都有多个客户端(例如 PC 上的 Outlook、手机上的 K-9、Roundcube Webmail 等),因此您永远无法确定您的邮件是否在您期望的客户端上打开。
如果您也收到来自这些人的邮件,您可以解析 X-Mailer 标头以提取他们使用的邮件客户端软件,但是,在很多情况下这不起作用。
It is not possible to detect receiving mail client in advance. Many users have multiple clients anyway (for example Outlook on the PC, K-9 on the Mobile Phone, Roundcube Webmail, ...), so you'd never be sure if your mail is opened on the client you expect.
If you also receive mails from these people you could parse the X-Mailer header to extract the mail client software they use, still, you'd have many cases where this doesn't work.
不可能。
...除非您请求收据,并且收件人的邮件客户端可以处理此问题,并且收件人同意发送此收据...但不能保证收件人会同意(我从来不这样做!),即使他们这样做,这将在事后发生,即在您发送电子邮件之后。
Not possible.
... unless you request a receipt, and the recipient's mail client can handle this, and the recipient agrees to send this receipt... but there is no guarantee the recipient will agree (I never do!) and even if they do, this will happen after the fact, i.e. after you have sent your e-mail.
唯一明智的方法是要求他们在用户配置文件中指定他们希望您相信他们将使用哪个邮件客户端。当您获得他们的电子邮件地址(您如何做到这一点?)时,您也可以请求此信息。 (我有点假设您的系统中有一些可以称为“用户配置文件”的东西。)
The only sane way to do this is to ask them to specify in their user profile which mail client they want you to believe they will be using. When you get their email address (how do you do this?) you could also request this information. (I am sort of assuming that you have something in your system which could be called a "user profile".)