Javamail uses Sendmail to send emails

Source: Internet
Author: User
Tags mx record

Today, the system needs to use its SMTP server to send emails. Our system architecture is based on appfuse. In fact, it uses spring mail to encapsulate javamail calls, previously, we used a third-party SMTP service.

 

I started to consider Postfix, good reputation, and had a long time. It was set up and needed support for domain name MX record. We just used it for testing. There was no domain name case test, but it was not done well!

However, Sendmail on our machine can send emails to external devices.

 

So after modifying the original configuration, javamail can call Sendmail to use SMTP,

Modify as follows:

 

 

Mail. DEBUG = false

Mail. Transport. Protocol = SMTP

 

Mail. Host = localhost

Mail. SMTP. Auth = false

 

Mail. Username =

Mail. Password =

 

 

As you can understand, Sendmail can also be used as an SMTP server, but the verification module is not installed by default.

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.