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 ...
随机推荐
- linux ps 命令的查看
linux ps 命令的结果中VSZ,RSS,STAT的含义和大小 ps是linux系统的进程管理工具,相当于windows中的资源管理器的一部分功能. 一般来说,ps aux命令执行结果的几个列的信 ...
- [Algorithm] Binary tree: Level Order Traversal
function Node(val) { return { val, left: null, right: null }; } function Tree() { return { root: nul ...
- [Canvas]人物型英雄出现(前作仅为箭头)
源码点此下载,用浏览器打开index.html观看. 代码: <!DOCTYPE html> <html lang="utf-8"> <meta ht ...
- HK Openstack Summit 归来有感
4天的Icehouse openstack Summit终于结束,从香港又回到了北京,我们的产品反响相当不错,吸引了很多的注意力和商谈.可是实际上我最近过得很憋屈,心灰意冷,没有了当初那么拼命的动力. ...
- Solidworks如何在零件表面贴图
在要增加图片的表面上右击,然后选择修改这个面的颜色(可以是曲面) 切换到高级,然后选择一个图片 你可以缩放图片的大小,从而决定图片的重复次数 如果图片上下或者左右颠倒了,可以在映射里面勾选 ...
- Oracle数据表中输入引号等特殊字符
Oracle输入特殊字符的特殊方法: UPDATE BOOKMARK SET BM_VALUE=q'/ --在这里写下需要输入的内容(可以包括引号.回车等特殊的符号),所见即所得 /' -- WHER ...
- Elasticsearch之集群脑裂
https://www.cnblogs.com/zlslch/p/6477312.html
- iOS编程(双语版)-视图-Autolayout代码初步
一谈到Autolayout,初学者肯定想到的是IB中使用拖拽啊,pin啊各种鼠标操作来进行添加各种约束. 今天我们要聊得是如何利用代码来添加视图间的约束. 我们来看一个例子: (Objective-C ...
- Shiro整合springboot,freemaker,redis(含权限系统完整源码)
区块链技术联盟 2018-02-08 17:06:40 目录 一.导语 二.shiro功能介绍 三.shiro详解 四.shiro实战案例分享 五.系统配置 六.其他 一.导语 今天推荐给大家一个非常 ...
- excel自定义数据验证
1. 判断必须为5位或者9位的数字 2. 自定义限制级别和提示消息