ECS server dedicated network cannot send emails

There is a customer who cannot send emails under the ECS private network of the Alibaba Cloud server, so we conducted a test and looked for a solution. First, determine which of the following methods is the customer's sending method? Is there any return information or exception information? And adopt the corresponding treatment suggestions.

1. What sending methods does push mail support?

Email push supports three sending methods:

• Send emails through the push email console. Currently, batch emails are supported, but trigger emails are not supported.

• Send mail through the API interface.

• Send mail through the SMTP interface.

2. The fault conditions are as follows:

When sending an email request, it appears: Provisional headers are shown

Several procedures for troubleshooting:

1) First of all, you have to check whether your Alibaba server is a classic network or a VPC. This article is mainly suitable for a VPC server, because the VPC server prohibits port 25 for sending emails.

2) Ali server proprietary network, relatively strong security, a layer of firewall is set up by default (security group in Ali control management background)

Centos itself has a 2-layer firewall. By default, iptables is enabled. You need to configure the corresponding open ports yourself (the screenshot of the open ports is attached at the bottom of the article). In addition, the selinux firewall needs to be closed (rarely used)

3) The server of Alibaba ecs proprietary network prohibits port 25, so you can only use port 465 to send mail;

4) First, the original smtp server information is changed to ssl://, that is, ssl:// is added in front of the original basis;

5) Modify the phpweb path file: includes/, find the code 47 lines

$fp = fsockopen( $smtp, 25, &$errno, &$errstr, 20 );

Change 25 to 465 and save, the test sending is perfectly solved.



There is return information or exception

1. Please refer to the code troubleshooting provided by the corresponding API

If no information or exception is returned

1. Check whether the service area used by DM is correct? Is the region consistent with the service area to which the DM belongs? Is AK correct?

2. Please check whether the parameters are provided according to the document, and whether they are consistent with the parameter values set in the console? Is the server time zone consistent with the document requirements?

3. Is the signature correct? Especially the replacement of special characters

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us