惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
P
Proofpoint News Feed
D
DataBreaches.Net
C
Check Point Blog
L
LangChain Blog
量子位
美团技术团队
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
V
Visual Studio Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
腾讯CDC
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale

博客园 - 子风

Android相关转载帖子 c++ 函数的工作原理 C和C++的存储模式 VS2005配置开发ARM c++ 虚析构函数的思考 arm-linux-g++ 下交叉编译libxml2 (转)Eclipse代码提示功能设置(Java & C/C++) linux下面eclipse的c++配置 VS2008 配置boost 用VS.NET2008打包程序遇到不可恢复的生成错误的解决方案 推荐一个原型的设计软件 Mockups For Desktop Grid++Report——推模式下填充子报表 c# 对象的创建过程 XP下IIS错误:Server Application Error css总结 asp.net缓存-数据依赖缓存 - 子风 - 博客园 .net 测试工具 .net 发送Email 利用7z来分卷压缩文件
Failure sending mail - 子风
子风 · 2010-07-06 · via 博客园 - 子风

     最近在做asp.net发送邮件的功能,发现一个问题:在vs环境下,邮件是可以发送到对方的邮箱的,一旦部署到服务器上就会提示 :Failure sending mail 的错误。

    上网了找了下,先解决办法如下:

  1:服务器上要装有smtp服务,在IIS里面。

  2:修改代码 SmtpClient client = new SmtpClient("localhost");

本地环境:vs2008 + WinXP

远程服务器:win2003繁体

修改测试后发现用163的邮箱可以发送,但是用 gmail就发送不成功!gmail的端口是587,一般的都是25端口。

不知道什么原因,希望知道的人可以解答下。

参考:http://www.programmersheaven.com/mb/csharp/366962/366963/re-failure-sending-mail/

        http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/84e4d5a2-5919-4d6b-85cd-6b9f9d49b7e8

学习,积累中......