Operation Scenarios
To enhance the quality of sending emails through Tencent Cloud’s IP addresses and for security considerations, CVMs are blocked from accessing external TCP port 25 by default. For customers who need to send emails using CVMs, this document guides you to configure and use port 465 supported by third-party mail service providers.
Notes
Basic Principles
The basic principle of sending emails using the SSL encryption port is the same as that of sending emails using a client (for example, Outlook) on a local host to connect to the email server. The host connects to the outgoing email server of the external email server and uses account and password authentication verification configured by the program to send emails, rather than the server itself sending emails.
Key Implementation Points
The basic implementation method of sending emails using the SSL encryption port is the same as that using port 25, but after switching to the SSL encryption protocol, special attention must be paid to the following points:
When the pre-written program calls an external email server to send emails, the email server must support the SSL encryption feature.
When the host connects to the email server, please enable the SSL encryption protocol in the pre-written program.
Change the port connecting to the external email server to the SSL encryption port (Port 465). Specific configuration information can be obtained from the email service provider.
Operation Steps
1. Contact the email service provider to obtain the configuration information for sending emails. It usually includes the following configuration information:
Outgoing email server address: for example, t***.example.com
Outgoing email server port number: 465
Email username: It could be the email address or email address prefix. You can consult the email service provider for specifics.
Email client password: For some email service providers, the login password for the Web browser interface and the client password are not the same, and might need to be set separately. Please consult the email service provider for details.
2. Use client software (Outlook and Foxmail) on the local host to set up the local client based on the obtained mail configuration information, and send a test email.
3. Choose the appropriate program example according to the actual development language and download the program example locally.
SMTP email sending program examples are as follows:
4. Write the email server configuration items in the program example using the tested configuration information.
Was this page helpful?