I. Overview
First of all, it must be clear that SMTP is the core of the mail server, with SMTP. Do not believe you turn off hMailServer POP3 and IMAP, the server can also send and receive mail. POP3 and IMAP are just the two protocols that the mail server implements to provide mail clients with the collection and management of messages, where the POP3 protocol can only charge messages on the server, and the IMAP protocol allows clients to manage messages on the server. Almost all third-party servers currently have SMTP restrictions such as sending quotas, and almost all mail servers detect whether the sender's domain name and IP match. Simply do not use a third party to test, also do not use the Locahost to send mail test, in the end how to test it? There are 3 scenarios for sending tests in a non-server environment:
(1) Simulate the sending of mail, do not really send mail. Write the contents of the message to the log file.
(2) Simulate the receipt of the message. Send mail using localhost smtp. Using Smtp4dev and so on to intercept incoming mail, with Windows Live Mail and Windows MBox Viewer can read the EML format of the client, you can get the correct format of the message, the recipient will not receive the message.
(3) with domain names and servers available, set up the domain name MX and build the mail server, through the mail server's SMTP to send the actual mail. Can be detected by the domain IP of the recipient's server, but the security measures should be configured to prevent the mail server from being exploited.
Sending mail can use the SMTP features of the Windows Server 2008+ system, but it does not provide system support for the POP3 and IMAP protocols, so the client Access mail server cannot be used.
If we want to use the Client Access mail server, under the Windows Server 2008+ environment and open source free of charge, the best choice now is hmailserver. If you plan to switch to hMailServer, be sure to disable the SMTP service for the system. Otherwise, hMailServer cannot listen to the SMTP port and cannot receive messages.
Second, MX settings
The MX settings are referenced as follows, configured in Domain name resolution:
To check the MX settings on the service:
Third, use the system's SMTP features to send mail:
With Windows Server 2008 as an example, the installation and service settings for SMTP features are simpler, as omitted here.
1. Domain Name configuration:
First is the domain name: set in the delivery-> advanced
2.IP Configuration
3. Adoption. Net send mail:
Web.config configuration:
Send code:
Four, use hMailServer to send and receive messages : hMailServer installation and Han-self-handled. It is important to remember that using hMailServer must use both SMTP and POP3, and stop the system's own SMTP service, or you cannot receive mail. 1. Add domain name:
2. Add account:
3. Configure message submission:
4. Binding IP:
6. Test configuration:
v. Web mail client clients can send and receive mail by using CS mode Outlook Express and Foxmail, or by using the collection function provided by the 163 BS mode Web mailbox. hMailServer provides the mail server with the ability to send and receive mail, and provides support for both POP3 and IMAP protocols. Open source free web mail client, non. NET Web mail client implementation More, commonly used such as PHP squirrelmail and Roundcube. NET mail client is less pitiful, but the implementation of the relevant collection protocol component library is still not missing. Sometimes you need to integrate the management of mail in the background, you can use these components directly, such as IMAPX. 1. Integrated mailing list function: 2. Mark Read unread:
4. Interface reference:
Send mail and reply to mail involves contacts, drafts and attachments, etc. to be relatively complex, see whether the need to integrate the full function, after all, the component library has provided a complete function, we only need to its packaging and calls, with the interface operation on it, One of the difficulties in building a perfect AJAX-enabled Web client interface is not in the background implementation, but in the foreground, it is not related to the topic. Interested can be achieved by themselves.