c# 4.0 - how to i SMTP with c# 4/.NET 4 to port 465/SSL (...
first, i've discovered through trial and error that c# 4/.NET 4 has some serious limitations which are to me unexplainable.
Microsoft is not supporting SSL over port 465 in c# 4/.NET 4.
Microsoft only supports SSL on 587 through "STARTTLS".
i need to use 465/SSL because my mail server hMailServer does not support "STARTTLS".
i had hoped to use c# 4/.NET 4 out of the box ... i do not want to purchase any third party solutions.
what i would like to do is to craft my own solution for SMTP using SSL on port 465.
i'm guessing that i may have to use c# unmanaged code to make this happen.
any ideas?, please & thank you. rgds/gerry
References:
"configuring SSL confusion...", hMailServer forum thread.
MSDN: "SmtpClient.EnableSsl Property":
"An alternate connection method is where an SSL session is established up front before any protocol commands are sent. This connection method is sometimes called SMTP/SSL, SMTP over SSL, or SMTPS and by default uses port 465. This alternate connection method using SSL is not currently supported."
P.S.: i searched SO and Google and can find nothing directly relevant.
f you can, and if it still works ("This API is now obsolete"), you should be able to use SMTPS (SMTP with up-front SSL/TLS) using System.Web.Mail.MailMessage:
System.Web.Mail.MailMessage mailMsg = new System.Web.Mail.MailMessage();
// ...
mailMsg.Fields.Add
("http://schemas.microsoft.com/cdo/configuration/smtpusessl",
true);
Of course, the fact that this API is now obsolete in .Net 4 is not ideal. It probably still works in practice.
Failing that, you may have to rely on 3rd-part libraries or something like stunnel.
c# 4.0 - how to i SMTP with c# 4/.NET 4 to port 465/SSL (...的更多相关文章
- Could not connect to SMTP host: smtp.***.com, port: 465, response: -1
背景 在使用javamail进行邮件发送的时候,报错: Could not connect to SMTP host: smtp.***.com, port: 465, response: -1 原因 ...
- 腾讯企业邮箱报错 "smtp.exmail.qq.com"port 465, isSSL false
一.报错 "smtp.exmail.qq.com" port 465, isSSL false 通过网上搜索查询一些资料,推测是邮箱的配置出问题了. 二.修改邮箱配置 // 创建属 ...
- Could not connect to SMTP host: smtp.qq.com, port: 465, response: -1 SpringBoot发送邮件
解决方案 换端口 QQ邮箱可以把端口换成587 设置属性 spring.mail.properties.mail.smtp.ssl.enable=true 原因 465端口是为SMTPS(SMTP-o ...
- 解决Yii2邮件发送问题(结果返回成功,但接收不到邮件)
刚刚用了一下yii邮件发送功能,虽然结果返回成功,但接收不到邮件.配置文件代码如下: 'components' => [ 'db' => [ 'class' => 'yii\db\C ...
- Linux系统诊断必备技能之二:tcpdump抓包工具详解
一.简述 TcpDump可以将网络中传送的数据包完全截获下来提供分析.它支持针对网络层.协议.主机.网络或端口的过滤,并提供and.or.not等逻辑语句来帮助你去掉无用的信息. Linux作为网络服 ...
- ELK日志系统使用说明
数据探索 Elasticsearch具有强大的数据检索和分析同能,支持模糊.全文.过滤.管道等数据查询.对于日志型数据处理很有优势. 下图为KIbana的主页图,将逐步说明每一部分的功能: 依照图中的 ...
- Docker-compose Setup for Self-hosting Development & Deployment Tools
Last week I wrote about my self-hosted Sentry install in 3 Docker containers. This week I want to br ...
- MongoDB and GUI 管理界面
MongoDB https://www.mongodb.com/ MongoDB AtlasDatabase as a Service The best way to deploy, operate, ...
- Kindle:自动追更之发送邮件
@echo off setlocal enabledelayedexpansion set from=Kindlekindle设置好信任的邮箱set pw=密码 set to=Kindle邮箱 cd ...
随机推荐
- vim高级用法
http://vim.wikia.com/wiki/Using_command-line_history ----------------------------------------------- ...
- Kernel Memory Layout on ARM Linux
这是内核自带的文档,讲解ARM芯片的内存是如何布局的!比较简单,对于初学者可以看一下!但要想深入理解Linux内存管理,建议还是找几本好书看看,如深入理解Linux虚拟内存,嵌入系统分析,Linux内 ...
- Android性能优化系列之App启动优化
Android性能优化系列之布局优化 Android性能优化系列之内存优化 Android性能优化系列之apk瘦身 应用的启动速度缓慢是我们在开发过程中常常会遇到的问题,比方启动缓慢导致的黑屏.白屏问 ...
- 【python】安装py3-bencode 及小例程
C:\Users\horn1\Desktop\python\35-bencode-ng>pip install py3-bencodeCollecting py3-bencode Downloa ...
- 百科知识 英特尔处理器I5 4460和4590有哪些区别
4460是855元 4590是880元 i5 4460与4590CPU主要区别在:1.主频差0.3GHz;;2.最大睿频相差0.5GHz;:3.核显(HD4600)最大动态频率相差0.1GHz ...
- MySQL 存储过程/游标/事务
将会用到的几个表 mysql> DESC products; +------------+--------------+------+-----+---------+-------------- ...
- linux发送邮件的功能总结
今天添加了发送邮件的功能,总结一下,供以后参考: 1.直接使用管道发送邮件 echo "hello,this is the content of mail.welcome to www.mz ...
- Percona-XtraBackup系列三:增量备份恢复
1:创建测试表和测试库如果需要快速建立测试表和库的话,参考之前写的这篇博客:http://www.cnblogs.com/xiaoit/p/3376685.html create database b ...
- SSM实战——秒杀系统之创建项目、管理依赖、设计数据库
注:本项目使用Myeclipse开发. 一:项目创建 1:使用Myeclipse创建一个web project,命名为MySeckill,并转换为Maven项目. 2:创建项目文件目录如下: 上面四个 ...
- java 线程池线程忙碌且阻塞队列也满了时给一个拒接的详细报告
线程池线程忙碌且阻塞队列也满了时给一个拒接的详细报告.下面是一个自定义的终止策略类,继承了ThreadPoolExecutor.AbortPolicy类并覆盖了rejectedExecution方法把 ...