Home Database Mysql Tutorial JavaMail访问Hotmail邮箱_MySQL

JavaMail访问Hotmail邮箱_MySQL

Jun 01, 2016 pm 02:06 PM
javamail access mail Mail

JavaMailHotmail

  相信许多人都有MSN聊天工具的帐号,例如abc@hotmail.com ,这个账号其实也是一个邮件地址,可以进行正常的邮件收发功能,你可以通过网址 http://www.hotmail.com 来访问和操作这个邮箱进行邮件的收发。但是这个邮箱有一个限制就是它并不提供POP3或者SMTP服务,也就是说一般的邮件客户端工具无法使用这个邮箱,虽然现在有不少的邮件工具可以支持Hotmail邮箱,但是如果我们需要在我们的Java项目中增加对Hotmail邮箱的支持,那往往会不知从什么地方开始入手,因为SUN公司提供的JavaMail 本身并不提供对除了POP3/IMAP以及SMTP外其他协议的支持。

  但事实上,JavaMail只是定义了一组平台无关、独立于通讯协议的邮件程序框架,或者说是接口,它是作为Java的可选包存在的。因此可以这样说:JavaMail并不关心所使用的协议,不管是POP3、SMTP、IMAP当然还有Hotmail用的HTTP协议。对于JavaMail的客户端而言也是这样的,下图就是一个最简单的JavaMail结构图,通过Transport进行邮件的发送,通过Store实现对邮件的收取,而不同协议的实现,JavaMail里的概念叫做Provider,只需要根据JavaMail定义的接口实现自己的Provider即可。

JavaMail访问Hotmail邮箱_MySQL


  为了实现通过JavaMail访问Hotmail邮箱,我们就需要架起JavaMail接口与Hotmail服务所提供的访问接口之间的桥梁。在这之前我们必须首先了解Hotmail所使用的接口协议。

  Hotmail通过地址 http://services.msn.com/svcs/hotmail/httpmail.asp 提供基于HTTP协议的服务,它不同于我们通过浏览器访问 http://www.hotmail.com 的这个地址,后面这个地址是提供给用户一个基于浏览器的访问界面以便对邮箱进行操作,你当然可以通过编写HTTP客户端程序来解析页面并获取邮件的信息,但是这样做不仅实现的复杂程度非常高,而且每次页面风格发生变化后程序都要做相应的调整,因此不具备通用性,显然是不可行的。而地址 http://services.msn.com/svcs/hotmail/httpmail.asp 则不同,它提供了固定的应用程序接口。当你使用浏览器访问该地址的时候,会弹出下面要求登录的窗体:

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Sesame Open Door Official Website Sesame Open Door App Latest Entering Website Sesame Open Door Official Website Sesame Open Door App Latest Entering Website Feb 28, 2025 am 11:18 AM

This article simulates the registration process of a cryptocurrency trading platform (or similar platform) called "Sesame Open Door", focusing on the three steps of registration, KYC certification and binding payment methods, and emphasizes the importance of choosing a formal platform, protecting personal information and fund security. The article details the specific operations of each step, such as visiting the official website to verify identity, uploading identity certificate documents to complete KYC authentication, and binding a bank card, etc., and reminds users to be wary of phishing websites and fraud risks, choose a regulated platform for transactions, and protect their own rights and interests. The article also includes a link to the official website address, which is convenient for users to access quickly.

Sesame Open Door Exchange Web Page Login Latest version gateio official website entrance Sesame Open Door Exchange Web Page Login Latest version gateio official website entrance Mar 04, 2025 pm 11:48 PM

A detailed introduction to the login operation of the Sesame Open Exchange web version, including login steps and password recovery process. It also provides solutions to common problems such as login failure, unable to open the page, and unable to receive verification codes to help you log in to the platform smoothly.

okx Ouyi official website registration portal 2025 okx Ouyi official website registration portal 2025 Mar 04, 2025 pm 11:45 PM

OKX Ouyi is a leading cryptocurrency trading platform. This article will provide detailed steps to guide you on how to register an OKX Ouyi official website account. You will learn how to access the official website, choose the registration method, fill in the necessary information, and complete the registration process. The article also contains information about precautions, such as the importance of using real personal information and setting a strong password.

gate.io registration tutorial gate.io registration tutorial Mar 31, 2025 pm 11:09 PM

This article provides a detailed Gate.io registration tutorial, covering every step from accessing the official website to completing registration, including filling in registration information, verifying, reading user agreements, etc. The article also emphasizes security measures after successful registration, such as setting up secondary verification and completing real-name authentication, and gives tips from beginners to help users safely start their digital asset trading journey.

gateio exchange app old version gateio exchange app old version download channel gateio exchange app old version gateio exchange app old version download channel Mar 04, 2025 pm 11:36 PM

Gateio Exchange app download channels for old versions, covering official, third-party application markets, forum communities and other channels. It also provides download precautions to help you easily obtain old versions and solve the problems of discomfort in using new versions or device compatibility.

Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Mar 04, 2025 pm 04:51 PM

Gate.io (Sesame Open Door) is the world's leading cryptocurrency trading platform. This article provides a complete tutorial on spot trading of Gate.io. The tutorial covers steps such as account registration and login, KYC certification, fiat currency and digital currency recharge, trading pair selection, limit/market transaction orders, and orders and transaction records viewing, helping you quickly get started on the Gate.io platform for cryptocurrency trading. Whether a beginner or a veteran, you can benefit from this tutorial and easily master the Gate.io trading skills.

How to register and download the latest app on Bitget official website How to register and download the latest app on Bitget official website Mar 05, 2025 am 07:54 AM

This guide provides detailed download and installation steps for the official Bitget Exchange app, suitable for Android and iOS systems. The guide integrates information from multiple authoritative sources, including the official website, the App Store, and Google Play, and emphasizes considerations during download and account management. Users can download the app from official channels, including app store, official website APK download and official website jump, and complete registration, identity verification and security settings. In addition, the guide covers frequently asked questions and considerations, such as

What are the routines of digital currency contracts? How to play a digital currency contract? What are the routines of digital currency contracts? How to play a digital currency contract? Mar 03, 2025 pm 07:06 PM

Digital currency contract trading: Investment strategies that coexist with high returns and potential risks. Digital currency contract trading. Unlike spot trading, investors need to predict the ups and downs of the price of digital currency and choose to go long or short contracts to make a profit. Contract trading usually uses leverage, with potential returns higher than spot trading, but also accompanied by higher risks. This article will reveal common pitfalls in digital currency contract trading and provide detailed steps for contract trading on Ouyi OKX Exchange. Risks and Traps of Digital Currency Contract Trading There are many risks hidden in the market for digital currency contracts, and criminals or platforms may use rule loopholes to make profits. Common pitfalls include: Price manipulation: manipulate market prices through centralized trading, artificially raising or lowering prices to make profits. Information asymmetry: platform or transaction

See all articles