要在单击Outlook邮件中的链接后触发自动回复 [英] Want to trigger Automate reply after click on a link in Outlook mail

查看:131
本文介绍了要在单击Outlook邮件中的链接后触发自动回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Outlook中进行自动化,最终用户将收到一封邮件,该邮件将通过单击链接触发自动回复邮件并转到相应人员,从而成为他们的链接.到目前为止,我尝试过的代码如下.

I am doing an Automation on outlook where End user will receive a mail where their will be a link by clicking on which an auto reply mail will be trigger and go to respective person. The code i Tried So far is mentioned below.

Sub MailURL()

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<HTML><BODY>"
strbody = strbody & "xxx@xxx.com"
strbody = strbody & "</BODY></HTML>"
On Error Resume Next
With OutMail
    .to = "abc.domain.com"
    .Subject = "Testing URL"
    .HTMLBody = strbody
   ' .Send
   .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing

End Sub   

我知道这被视为垃圾邮件,但这是我们项目的要求,在该项目中,我们将向用户发送包含一些数据的邮件,如果用户需要对该数据进行某些更改,则他可以单击该链接并且我们收到了包含请求的更改的邮件,因此我们进行了更改并在数据库中对其进行了更新.谢谢.

I understand that it is considered as a Spamming, but that was a requirement for our project, where we will send a mail with some data to end user and if user need some change in that data then he can click on that link and we receive a mail with requested changes so we make changes and update it in database. Thanks.

推荐答案

如果我了解您想要的内容,则需要在正文上添加一个链接,如果单击该链接,将创建一个具有预定义收件人的新邮件.如果是这样,则此部分:

If I understand what you want, you need to add a link on the body that if clicked, will create a new mail with a pre-defined recipient. If that is so, this part:

"xxx@xxx.com"

应为:

"<a href=""mailto:xxx@xxx.com"">Relpy here</a>"

您还可以添加这样的主题:

You can also add a subject like this:

"<a href=""mailto:xxx@xxx.com?subject=Change Request"">Relpy here</a>"

用于添加超链接的HTML语法使用的是<a href="yourlink">your_linked_text</a>.
对于您的情况,您需要在链接的电子邮件地址之前添加mailto:来创建新邮件.

HTML syntax to add hyperlink is using <a href="yourlink">your_linked_text</a>.
In your case, you need to add mailto: in front of the linked email address to create a new mail.

注意:这不会自动发送答复(正如您所说的那样,它可以被视为垃圾邮件,所以我们不要这样做.)

Note: This will not automatically send the reply (as you've said that can be considered spamming so let's not do that.)

这篇关于要在单击Outlook邮件中的链接后触发自动回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆