hotmail开放了pop3,可以使用客户端工具收取邮件了。

POP 服务器: pop3.live.com (端口 995)
需要 POP SSL?: 是的
用户名: Windows Live ID, 比如:livesino@hotmail.com
密码: 对应 Windows Live ID 的密码
SMTP 服务器: smtp.live.com (端口 25)
需要身份验证?: 是的
需要 TLS/SSL?: 是的

使用indy,需要SSL认证,到网上查阅 ,看到了Marco Cantù的文章:

Send mail to GMail using Indy

Once you've moved your email accounts to GMail (or even entire domains), you have to fix the code you use in your Delphi programs for generating and sending email automatically. In fact, GMail uses the SMTP protocol for sending email, but with a specific form of SSH encryption called TLS.

To make things even more complicated, different clients use different ports and configurations. In particular, Outlook (which providees no TLS support) has different settings. For Indy, you can follow the settings used by other client programs, like those provided for Thunderbird. More info on the various ports in this newsgroup post:

Gmail uses 25, 465 and 587 for SMTP, but since almost all isps block 25, 465 is the preferred SMTP with SSL for gmail, and 587 is the preferred SMTP with TLS port.

Here is the code of a demo program, with the DFM file and the actual Delphi code (which is the same you'd generally use):

  object IdSMTP1: TIdSMTP
OnStatus = IdSMTP1Status
IOHandler = IdSSLIOHandlerSocketOpenSSL1
Host = 'smtp.gmail.com'
Password = '***'
Port = 587
SASLMechanisms = <>
UseTLS = utUseExplicitTLS
Username = '****'
end
object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL
Destination = 'smtp.gmail.com:587'
Host = 'smtp.gmail.com'
MaxLineAction = maException
Port = 587
SSLOptions.Method = sslvTLSv1
SSLOptions.Mode = sslmUnassigned
SSLOptions.VerifyMode = []
SSLOptions.VerifyDepth = 0
OnStatusInfo = IdSSLIOHandlerSocketOpenSSL1StatusInfo
end
      IdSMTP1.Connect;
IdSMTP1.Send(IdMessage1);
IdSMTP1.Disconnect;

Where IdMessage1 is the message you want to send. Of course, you can both send messages to your gmail account or to any other account from you GMail account.

Notice: If you don't use "explicit TLS" you'll have to make extra initialization calls (like: IdSMTP1.SendCmd('STARTTLS', 220);). Finally, the IdSSLIOHandlerSocketOpenSSL1StatusInfo event handler produces a report like this:

      SSL status: "before/connect initialization"
SSL status: "before/connect initialization"
SSL status: "SSLv3 write client hello A"
SSL status: "SSLv3 read server hello A"
SSL status: "SSLv3 read server certificate A"
SSL status: "SSLv3 read server done A"
SSL status: "SSLv3 write client key exchange A"
SSL status: "SSLv3 write change cipher spec A"
SSL status: "SSLv3 write finished A"
SSL status: "SSLv3 flush data"
SSL status: "SSLv3 read finished A"
SSL status: "SSL negotiation finished successfully"
status: "SSL negotiation finished successfully"
Cipher: name = [...]; description = [...] SSLv3 Kx=RSA Au=RSA Enc=3DES(168)

我没有测试gmail,连接hotmail,出错,后来反复尝试,将idpop的useTLS属性改为utUseImplicitTLS就顺利通过了。

注意:SSL需要下载DLL支持:

http://www.indyproject.org/Sockets/SSL.EN.aspx

Indy10收发Hotmail邮件的更多相关文章

  1. 在Office Outlook 2013中收发QQ邮件

    选择手动配置 选择第三项 点击More Settings,在Outgoing  Server 勾选 如下 确认后,按下一步完成配置,此时会弹出对话框进行邮件发送测试.

  2. hotmail邮箱pop3server设置方法

    hotmail邮箱 的POP3/SMTP功能仅仅向Hotmail Plus的用户开放,普通用户想要使用这一功能的话,得进行一些特别的设置.如今这一功能总算面向全部的用户开放了,虽然微软官方还没宣布这一 ...

  3. EDM博主笔记:EDM邮件营销的几个细节问题

    其实说起EDM邮件营销很多做过的人都知道,目前国内邮件营销的效果其实是比较差的,为什么?因为国内没有多少使用邮件的习惯,如果不是工作所需估计很多的人都几天不碰邮件了,但是反观国外 邮件是其日常的一部分 ...

  4. 分享一些免费的,开源的邮件server软件

    因为企业的须要,我们非常可能须要架设一个邮件server,微软的Exchange太复杂?GOOGLE出来的又收费!头大了吧,OK,贾芸斐在这里给大家分享推荐几个免费的开源的邮件server软件.希望你 ...

  5. 分享几个免费的开源邮件server软件

    因为企业的须要,我们非常可能须要架设一个邮件server,微软的Exchange太复杂?GOOGLE出来的又收费!头大了吧,OK,贾芸斐在这里给大家分享推荐几个免费的开源的邮件server软件.希望你 ...

  6. U-Mail邮件营销可视化编辑设计邮件模板so easy

    相信每位看过军事演习的朋友都知道,现代战争越来越就像一场沙盘演练,真正做到了“运筹帷幄之中决战千里之外”,后方坐镇指挥战斗的能够将前线战场变得透明,这就叫“可视化战争”,做到了<孙子兵法> ...

  7. pop协议,邮件密码嗅探 使用说明

    思路与源代码 可以查看 https://www.cnblogs.com/likehc/p/10140174.html 因为软件用的是Wincap,所以 第一步安装下 WinPcap 第二步,打开 sn ...

  8. RDIFramework.NET敏捷开发框架Web新增邮件中心实现便捷式的邮件收发

    1.引言 邮件收发在很多业务系统中都有这样的需求,是比较正式和常用的功能.在我们的框架中提供了邮件中心功能模块,集内部邮件的收发.邮件归类.邮件星标的标记.邮件的删除与彻底删除等,邮件中心功能模块界面 ...

  9. Linux中限制用户邮件的大小

    Linux系统使用sendmail发送邮件,配置文件是/etc/sendmail.cf,缺省使用TCP/IP协议. 我们的Linux机器上往往会有多个用户同时工作,或者干脆就用它作邮件服务器,在同一时 ...

随机推荐

  1. GoLang激活码

    虽然行为不太好,但是购买的话实在是比较贵. 进入软件,Help-Register,选择License Server,输入 http://idea.youbbs.org 激活即可.

  2. php学习(二)——html + css

    PHP学习 二.Html +css html 介绍 ——基本信息: 英文全称:HyperText Markup Language 中文名:超文本标记语言 2.易忘知识点 (1) html符号实体(又称 ...

  3. JavaWeb -- Struts2,对比, 简单表单提交,校验,防重复提交, 文件上传

    Struts2核心流程图 1. Struts2 和 Struts1 对比 struts1:基于Servlet(ActionServlet),actionForm众多(类的爆炸),action单例(数据 ...

  4. 某些编辑器运行C程序闪退的解决办法

    在某些C语言编辑器中运行C语言程序或点击生成的.exe文件出现闪退现象的解决办法,主要有两种,还有其它方法欢迎交流. 包含头文件<windows.h>,在程序末尾添加system(&quo ...

  5. cn_03_r2_enterprise_sp2_x86_vl_X13_46432

    1. 使用的 ISO为:cn_win_srv_2003_r2_enterprise_with_sp2_vl_cd1_X13-46432.iso 2.序列号 用的序列号是“DF74D-TWR86-D3F ...

  6. SpringBoot实现文件上传功能

    新建maven项目,pom文件: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="htt ...

  7. Python Falling back to the 'python' engine because the 'c' engine does not support regex separators

    环境 Anaconda3 Python 3.6, Window 64bit 书籍 O'Reilly出版的Wes McKinney编的<Python for Data Analysis> 警 ...

  8. 【LABVIEW到C#】3》String的操作之Match Pattern Funtion.vi

    C#实现如下 using System; using System.Collections.Generic; using System.Text; using System.Text.RegularE ...

  9. plsql连接不上oracle

    由于oracle存在64位的,但是目前plsql只有32位.导致登录后报错 -------------------------------------------------------------- ...

  10. react table dropdown

    <DropdownButton type="primary" trigger={['click']} onClick={() => this.detail(item)} ...