页面卸载后如何发送邮件 [英] How can we Send the mail when our page is unload

查看:95
本文介绍了页面卸载后如何发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以通过重定向页面来发送邮件吗?然后在另一个page_load事件中发送邮件.

创建一个WebPage,该WebPage在发生导致网页关闭的事件时自动向访问该WebPage的最近访问者发送电子邮件.询问细节,并据此做出适当的假设.

can we send mail by redirecting the page. and on the other page_load event we send the mail.

Make a WebPage which automatically sends an e-mail to the recent visitor accessing the WebPage, on occurrence of an event which causes the closing of webpage. Ask for the details and make appropriate assumptions accordingly.

推荐答案

您能对自己想做的事情更清楚一点吗?
目前,我没有发现任何问题,只要您在Web应用程序中设置了最近的访问者电子邮件ID和电子邮件设置,就不能发送电子邮件.

由于您触发事件是网页的关闭,因此:
1.您可以将Javacript用作电子邮件发件人(如果使用 mailto 拥有所有数据,则为客户端)或
2.在javascript中跟踪卸载,并使用 XMLHttpRequest 以便通过服务器端发送电子邮件
Can you be a little more clear on what you want to do?
for now, i don''t find any issue why you should not be able to send an emailo as long as you got the recent visitor email id and email settings set up in your web application.

Since you trigger event is closing of a webpage:
1. you can use Javacript as email sender (client side if you have all data using a mailto) or
2. track the unload in javascript and use XMLHttpRequest in order to send the email through server side


这篇关于页面卸载后如何发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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