Smtpclient超时属性

编程入门 行业动态 更新时间:2024-10-27 13:26:35
本文介绍了Smtpclient超时属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我继承了一个带有exe的系统,该系统通过 SMTPClient通过电子邮件发送附件PDF。 (我只是一个管理员而不是代码开发人员,所以请原谅我的任何错误) 当PDF变得更大时,它会超时... 我收集我需要更改命名空间System.Net.Mail和SmtpClient.Timeout属性。 (框架4.0) 我没有源代码,也不太了解。 我希望我能改变web.config /machine.config文件 但我不知道如何将VB代码示例与web.config格式联系起来。 任何帮助都会被贬低。请问是否这样是一个蹩脚的问题。 我需要一点帮助。 谢谢 我尝试了什么: 我修改了machine.config,代码之间有推断,语法错误。

I have inherited a system with an exe that emails an attachment PDF via the 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 . 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超时属性

本文发布于:2023-08-07 10:21:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1318591.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   Smtpclient

发布评论

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

>www.elefans.com

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