ASP.NET慢电子邮件发送

编程入门 行业动态 更新时间:2024-10-22 19:43:49
本文介绍了ASP.NET慢电子邮件发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的web应用程序(ASP.NET MVC),我用下面发送电子邮件:

In my web app (ASP.NET MVC), I send an email using the following:

MailMessage msg = new MailMessage("email@domain", "somewhere@recipient"); msg.Body = "Message body"; msg.IsBodyHtml = false; SmtpClient client = new SmtpClient(); msg.Subject = "Subject"; client.Send(msg);

我的system邮件设置如在web.config中如下:

My system Mail Settings are as follows in web.config:

<system> <mailSettings> <smtp deliveryMethod="Network" from="email@domain"> <network host="mail.domain" port="25" defaultCredentials="false" userName="email@domain" password="mypassword" /> </smtp> </mailSettings> </system>

这发出的电子邮件罚款。我所遇到的唯一问题是,电子邮件2-3分钟函数调用内发送和接收。

This sends out the email fine. The only issue I've experienced is that the email is sent and received within 2-3 minutes of the function call.

我已经看到了这个在使用SmarterMail,还没等我问在serverfault的好乡亲再质疑我的主机两台主机,我想知道如果theres什么编码明智的,可能会导致这2-3分钟的延迟。

I've seen this on two hosts that use SmarterMail, and before I ask the good folks at serverfault and then question my host, I wanted to know if theres anything coding-wise that could be causing this 2-3 minute delay.

这似乎是微不足道的,但我作为一个网页浏览者,恨它时我应该得到的电子邮件多久,特别是如果他们有这样的登录信息的关键信息。

It may seem negligible, but I as a web surfer, hate it when emails that I'm supposed to get take long, specially if they have crucial information like login information.

推荐答案

我认为这是关于你的服务器的网络流量。

i think this is about your servers network traffic.

更多推荐

ASP.NET慢电子邮件发送

本文发布于:2023-11-16 09:58:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603256.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:邮件发送   电子   ASP   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!