问题标签 [smtpclient]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - smtpclient.send() 将电子邮件发送到错误的地址(不存在的地址)
我需要检查邮件是否已成功发送给指定用户,但此函数不会为甚至不存在的电子邮件地址返回错误
如何处理这个
silverlight - SMTP 错误:发送电子邮件失败
我在这里下载了一个发送电子邮件 Silverlight 应用程序的示例应用程序。
通过 gmail。但我不能让它工作。它的错误是“发送邮件失败”。
{“发送邮件失败。”} [System.Net.Mail.SmtpException]:{“发送邮件失败。”}数据:{System.Collections.ListDictionaryInternal} HelpLink:null InnerException:{“无法连接到远程服务器” } 消息:“发送邮件失败。” 来源: "System" StackTrace: " at System.Net.Mail.SmtpClient.Send(MailMessage message)\r\n at SLSentEmail.Web.Services.EmailService.SendEmail(SLEmailMessage emailMessage) in C:\Downloads\Temp\SLSentEmail\ SLSentEmail\SLSentEmail.Web\Services\EmailService.svc.cs:line 27" TargetSite: {无效发送(System.Net.Mail.MailMessage)}
c# - 使用 smtp 客户端发送带有附件错误的电子邮件
我正在发送附件,并且电子邮件发送成功,但是当我尝试删除同一个文件时,它给出了错误,因为“文件正在被另一个进程使用”我正在由 system.io.file.delete() 删除
c# - 来自 .Net 的异步电子邮件
我正在尝试异步发送电子邮件,这样它就不会减慢我的前端(Asp.Net MVC)的速度。
我真的不明白第二个参数SendAsync
是为了什么。
MSDN 说它是一个传递给操作完成时调用的方法的对象
好吧,wtf?什么方法?所以我刚刚尝试传递 null 因为我真的不明白这是为了什么,但显然有问题。
asp.net - 通过 ASP.Net 并使用 SMTP 在特定日期和时间发送电子邮件
嗨,我已经提出申请...可以在指定日期有活动数量,所以我想在活动时间到达时编码 tat,以便参与者自动获取有关活动的信息......所以我想向所有人发送电子邮件一天前的参与者..所以建议我最好的链接想法
谢谢
(提前)
c# - SmtpClient.SendAsync 降低还是提高性能?
如果我有 2 个 SmtpClient 对象并且我同时在这两个对象上调用 SendAsync() 方法,这两个发送请求是在一个线程中按顺序处理还是在多个线程中同时处理?SendAsync() 方法的实现是什么?
如果每个 SendAsync() 方法调用都在来自 Web 服务器线程池的新线程中处理,这可能导致 Web 服务器线程池中的空闲线程减少,从而降低整体性能(如果达到线程池最大限制)。
我搜索了 MSDN 文档,但没有找到如何处理异步方法的解释。
asp.net - 在 .NET 中发送邮件
每个人!我正在尝试在 ASP.NET 网站中发送邮件。我在 web.config 文件中有 smtp 配置部分。如何配置它以将邮件从每个人发送给每个人?
wcf - WCF + SmtpClient: only works in a Windows 2008 environment
Continuing the discussion started in another post: I used windows service to host a WCF mail sender. The service itself is quite simple: it uses a DataContract to get the basic System.Net.Mail.MailMessage
class properties (supports attachment - please see the mentioned post, code by edosoft) and the System.Net.Mail.SmtpClient
class to actually send the e-mail. The .NET framework used was 3.5SP1 (with VS2008).
Please note that I already had the code working inside an assembly; the exercise was just to expose the functionality by using a WCF service. I used basicHttpBinding
for the endpoint binding, no additional configurations.
When I tested the service in my desktop environment (Windows XP) I noticed the following:
The e-mails were only sent if I restarted the windows service in the first 10-15 seconds after calling the WCF service, otherwise nothing would happen;
No exception/error messages whatsoever in the service trace/log files;
No exception/error messages when calling the
SmtpClient.Send(MailMessage msg)
method or anywhere else when running the service code.
I played with different bindings and configurations for a while, even tried to send the message from a different thread - no changes. I actually came accross with a forum question related to this problem: the same method called from within an ASMX webservice would only work is an IISRESET was performed. I was able to replicate this issue by creating an ASMX webservice using the same sending code used in the WCF. Hosting the WCF service under IIS was also of no help (same problem).
I decided then to deploy the service in a Windows 2008 environment (windows service hosted) - see, no changes in the original, simple code. Same configuration, same everything. It worked right away, no delays or any other problem I could identify. Does anyone have any idea about this issue? I'll try it in a Windows 2003 environment now, but I'd like to know if it's actually a known bug/limitation, or if it's somehow related to the ASMX bug related (as it appears to be). Does anyone have seen it before?
Thanks,
c# - 异步发送电子邮件问题
我已经为我的站点配置了 smpt 邮件,当我尝试发送一封电子邮件时它可以工作,但是当我想将它发送给更多人时出现以下错误,此外我使用 SendAsyn 方法。
当我使用 LOOP 发送所有电子邮件时
语法错误,命令无法识别。服务器响应为:
System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result)
at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result)
当我将所有电子邮件添加到密件抄送时
服务不可用,正在关闭传输通道。
服务器响应是:太多错误的命令,
在 System.Net.Mail.SmtpTransport.EndSendMail(IAsyncResult result)
在 System.Net.Mail.SmtpClient在 System.Net.Mail.SendMailAsyncResult.End(IAsyncResult 结果) 关闭传输通道
。 SendMailCallback(IAsyncResult 结果
解决方案是什么?
c# - 发送电子邮件后应用程序使用 50% 的 CPU
我有一个正在处理的应用程序,当我尝试发送电子邮件时,电子邮件发送成功,但应用程序随后使用 50% 的 CPU 直到它被关闭。
这是导致问题的发送方法。
我不知道该怎么做才能使这项工作,任何帮助将不胜感激。
谢谢,