单击电子邮件中的按钮以创建包含内容的新电子邮件 [英] Button in Email click to create new email with content

查看:63
本文介绍了单击电子邮件中的按钮以创建包含内容的新电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简介

我目前正在使用 C#开发系统.

系统关于请求批准.发出请求后,系统将向用户发送电子邮件,要求其答复.

用户的响应就像批准,拒绝或请求更新一样简单.

问题/问题

是否可以在电子邮件内容中具有一个按钮(批准或拒绝),该按钮允许用户只单击一次即可响应系统,而没有打开浏览器?

或者,是否可以在电子邮件内容中创建按钮,使用户能够单击以创建带有预设主题和收件人的新电子邮件,如下所示:

主题:请求ID-123-操作-批准

至:response@system.com

作为用户发送的回复电子邮件.

然后系统可以识别收到的电子邮件并执行所需的后端过程.

完成研究

研究1

我目前发现的是Outlook约会电子邮件.就像第二种解决方案一样,它可以创建包含内容的新电子邮件,以便用户发送响应.但是,它只有接受,拒绝和尝试的选项.

而且,我不确定Blackberry是否像Outlook一样支持它.

以下是创建约会电子邮件的博客: http://chuckdotnet.blogspot.my/2007/10/send-outlook-meeting-requests-with.html

研究2

以下网站教您如何在电子邮件内容中创建超链接,从而可以创建具有预先填充的主题,正文和收件人的新电子邮件

https://community.articulate.com/discussions/building-better-courses/hyperlink-to-create-an-aready-write-email

但是,黑莓还没有进行过测试.

感谢你们的任何建议,我愿意尝试.

解决方案

是否可以发送带有按钮的电子邮件,该按钮可以单击以创建带有一些预设内容的电子邮件吗?

是的,这是可能的,请参阅.NET框架中的System.Net.Mail代码. https://msdn.microsoft.com/en-us/library/system.net.mail(v = vs.110).aspx

您还可以看到有关如何使用它的StackOverflow问题.使用C#通过SMTP发送电子邮件

  MailMessage邮件=新的MailMessage("you@yourcompany.com","user@hotmail.com");SmtpClient客户端=新的SmtpClient();client.Port = 25;client.DeliveryMethod = SmtpDeliveryMethod.Network;client.UseDefaultCredentials = false;client.Host ="smtp.google.com";mail.Subject =这是一封测试电子邮件.";mail.Body =这是我的测试电子邮件正文";client.Send(邮件); 

最后,您的代码应在单击按钮时触发服务器端帖子,以使服务器负责发送电子邮件.如果需要将数据发布到服务器,则您可能需要考虑将这些数据放入表单输入中,该表单输入将发布到您的控制器中.然后,您可以获取这些数据,并使用链接中提供的示例构建电子邮件.

Introdution

I am currently working a system develop with C#.

The system is about request approval. When a request made, system will send email to user ask for response.

User's response will as simple as approve, reject or request update.

Question/Problem

Is it possible to have a button (approve or reject) in email content which allow user to response to system with only one click but without open browser?

Or, Is it possible to create button in email content which enable user to click to create new email with pre-set subject and recipient like following:

subject: request id - 123 - action - approve

to: response@system.com

as response email for user to send.

Then system can then recognize the email received and perform required back-end process.

Research Done

Research 1

What I currently found was outlook appointment email. it done like second solution create new email with content for user send a response. But, it only have options accept, decline and tentative.

And, I am not sure is blackberry support it like outlook.

The following is the blog found to create appointment email: http://chuckdotnet.blogspot.my/2007/10/send-outlook-meeting-requests-with.html

Research 2

The following website teach you how to create hyperlink in email content which can create new email with pre-populate subject, body, and recipient

https://community.articulate.com/discussions/building-better-courses/hyperlink-to-create-an-already-written-email

However, No test had perform in blackberry yet.

Appreciate for any suggestion from you guys and I willing to try.

解决方案

Is it possible to sent an email with button which can click to create email with some pre-set content?

Yes, this is possible, see the System.Net.Mail code in the .NET framework. https://msdn.microsoft.com/en-us/library/system.net.mail(v=vs.110).aspx

You can also see this StackOverflow question about how this is used. Send e-mail via SMTP using C#

MailMessage mail = new MailMessage("you@yourcompany.com", "user@hotmail.com");
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "smtp.google.com";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body";
client.Send(mail);

Finally, your code should fire a serverside post on button click to have the server take care of sending the email. If data needs to be posted to the server, you may want to consider putting this data in a form input, which will post to your controller. You can then take that data and build the email with the example I provided in the links.

这篇关于单击电子邮件中的按钮以创建包含内容的新电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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