Smtpclient超时属性 [英] Smtpclient timeout property

查看:150
本文介绍了Smtpclient超时属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一个带有exe的系统,该系统通过.net SMTPClient通过电子邮件发送附件PDF。 (我只是一个管理员而不是代码开发人员,所以请原谅我的任何错误)



当PDF变得更大时,它会超时...



我收集我需要更改命名空间System.Net.Mail和SmtpClient.Timeout属性。 (框架4.0)

我没有源代码,也不太了解.net。

我希望我能改变web.config /machine.config文件

但我不知道如何将VB代码示例与web.config格式联系起来。

任何帮助都会被贬低。请问是否这样是一个蹩脚的问题。

我需要一点帮助。



谢谢



我尝试了什么:



我修改了machine.config,代码之间有推断,语法错误。

I have inherited a system with an exe that emails an attachment PDF via the .net SMTPClient. (I am just an administrator and not a code developer so forgive me for any errors)

When the PDF gets a little Bigger it times out ...

I gather I need to change the namespace System.Net.Mail and the SmtpClient.Timeout Property. (Framework 4.0)
I don't have the source code and don't really know much about .net.
I was hoping I Could just change the web.config/machine.config file
But I dont know how to relate the VB code example to a web.config format.
Any help would be apprecaiated .Sorry for asking if this is a lame question.
I just need a little help.

Thanks

What I have tried:

I modified the machine.config with inference between the code and it had wrong syntax.

推荐答案

SMTP的超时属性在web.config中不可用,这意味着您必须在代码中更改它。如果您没有源代码,则无法更改它。也许你可以考虑在某种程度上缩小pdf。
The timeout property for SMTP is not available in web.config which means you have to change it in code. If you do not have the source code then you cannot change it. Perhaps you can look into making the pdf smaller some way.


这篇关于Smtpclient超时属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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