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 ...
随机推荐
- JPA(五):映射关联关系------映射单向多对一的关联关系
映射单向多对一的关联关系 新建Customer.java: package com.dx.jpa.singlemanytoone; import java.util.Date; import java ...
- 如何检查显卡类型,DirectX和OpenGL的版本
How To: Check the graphics card type and OpenGL version From: http://support.esri.com/technical-arti ...
- Sublime Es6教程1-环境搭建
因为现在网上的教程都不靠谱,于是决定自己跳坑自己写,分为三块来玩: 一.环境搭建 二.语法讲解 三.项目实战 很多时候,你想搞一个东西,却因为环境没有搭建好,而不能很开森的探索未知的世界,多年的编程经 ...
- ASP入门(十五)- Global.asa
Global.asa 文件是一个可选文件,它可包含被 ASP 应用程序中每个页面访问的对象.变量和方法的声明.所有合法的浏览器脚本都可以在 Global.asa 中使用. Global.asa 文件只 ...
- redis 安装报错
CentOS 6.5 安装 Redis 执行 make #error "Newer version of jemalloc required" 根据你系统安装时或之后安装的选项的情 ...
- URAL 1224. Spiral (规律)
1224. Spiral Time limit: 1.0 second Memory limit: 64 MB A brand new sapper robot is able to neutrali ...
- jQuery clearQueue
clearQueue()方法与clearQueue()方法结合: .clearQueue()可用于删除通过.queue()方法添加到通用jQuery序列的任何函数. 示例: <!DOCTYPE ...
- LintCode: Fizz Buzz
C++ class Solution { public: /** * param n: As description. * return: A list of strings. */ vector&l ...
- MAVEN创建JAVA的Web工程
maven命令:http://blog.csdn.net/edward0830ly/article/details/8748986 1.创建MAVEN的Web工程 mvn archetype:gene ...
- Maven仓库下载jar包失败的处理方案
Maven仓库下载jar包失败的处理方案 在使用Maven项目的时候,有时候中央仓库并没有对应的包比如kaptcha-2.3.2.jar: 为了使我们的 项目能够正常运行下去,我们可以去别的地方下载对 ...