ASP 5 Series (vii) mail server and client

Source: Internet
Author: User
Tags imap all mail in domain net send

Directory:

I. Overview

Second, MX settings

Third, using the system's SMTP function to send mail

Iv. using hMailServer to send and receive mail

V. Web mail client

I. Overview

First of all, it must be clear that SMTP is the core of providing mail servers, and sending and receiving mail depends on SMTP. Don't believe you turn off hMailServer POP3 and IMAP, the server can still send and receive mail. POP3 and IMAP are just two protocols implemented by the mail server to provide mail clients with the charge and administration of mail, where the POP3 protocol can only charge messages on the server, while the IMAP protocol allows clients to manage messages on the server. Nearly all of the third-party servers currently have restrictions on sending quotas for SMTP, and almost all mail servers detect whether the sender's domain name and IP match. Simply put, do not use third-party testing, and do not use the self-built locahost e-mail test, in the end how to test it? In a non-server environment, there are 3 scenarios for sending test messages:

(1) the delivery of the simulated mail, not really send the message . Write the contents of the message to the log file, etc.

(2) The reception of the simulated mail. Send mail by using localhost smtp. using interception to receive messages such as Smtp4dev, 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) in the case of domain name and server availability, set up the domain name MX and build mail server, through the mail server SMTP for the actual delivery of mail . It can be detected by the domain name IP of the recipient server, but security measures are configured to prevent the mail server from being exploited.

Sending a message can use the SMTP functionality of the Windows Server 2008+ system, but 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, in the Windows Server 2008+ environment and open source free of charge, the best choice is now hmailserver. If you plan to switch to hMailServer, be sure to disable the SMTP service for the system. Otherwise, the hmailserver cannot listen to the SMTP port and cannot receive the message .

Second, MX settings

The MX settings are referenced below and configured in Domain name resolution:

Check the MX settings on the service:

Third, use the SMTP function of the system to send mail:

With Windows Server 2008 as an example, the installation of the SMTP feature and the settings for the service are relatively simple, omitted here.

1. Domain Name configuration:

First is the domain name: set in Delivery---Advanced

2.IP Configuration

3. Adoption. Net send mail:
Web. config configuration:

Send code:

Iv. use hMailServer to send and receive mail: hMailServer installation and Han-self-fix. It is important to remember that using hmailserver must both use SMTP and POP3, and stop the SMTP service that comes with the system, or you will not be able to receive mail. 1. Add a domain name:
2. Add an account:
3. Configure Mail submission:
4. Bind IP:
5. Configure IP range: The Auto-ban in the figure is due to the fact that my password is too simple and the failure during testing has caused hMailServer to automatically mask the IP of the server, so this restriction needs to be configured. This step is not required in other cases. 6. Test the configuration:
V. Web mail client clients can send and receive mail in CS modeOutlook ExpressAndFoxMail, you can also use163The collection function that is provided by a Web mailbox such as BS mode receives mail. hMailServer provides the ability to send and receive mail from the mail server, while providing support for both POP3 and IMAP protocols. Open source free web mail client, non-. NET Web mail client implementation More, commonly used such as PHPSquirrelMailAndRoundcube。. NET Web mail client is less pathetic, but implementing the relevant collection of protocol component libraries is still not missing. Sometimes you need to integrate mail management functions in the background, you can use these components directly, such as IMAPX and so on. 1. Integrated mailing list features: 2. Mark Read unread:
3. Delete the message:
4. Interface reference:
e-mail and reply to the message related to contacts, drafts and attachments to be relatively complex, to see whether the need to integrate the full functionality, after all, the component library has provided a complete function, we only need to wrap and call, with interface operation can be, The difficulty of building a perfect AJAX-enabled Web client interface is not in the background, but in the foreground, it is not related to the theme. Interested can be realized by themselves.

ASP 5 Series (vii) mail server and client

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.