How to Fix Custom Domain Login for Tencent Free Enterprise Email

tencent enterprise emailcustom domain loginphp redirect scriptfree business emailmail subdomain setup
Published·Modified·

Currently, major companies like NetEase, Alibaba Cloud, and Tencent have launched free versions of enterprise email. Enterprise email allows you to use your own domain as a suffix, making it more personalized and unique. XiaoZ Blog has been using Tencent Enterprise Email for sending emails, but unfortunately, the free version no longer supports logging in with a custom domain like mail.yourdomain.com.

xiaoz_mail

Actually, solving this problem is very simple; you only need a small PHP script. The only tools you need to prepare are: a top-level domain, Tencent enterprise email activated with correct DNS resolution, and a virtual host or VPS that supports PHP. Here is the specific method.

1. Create the Code

Copy the code below and save it as an index.php file. In the code, xiaoz.me is the domain you used when activating Tencent Enterprise Email; please change it to your own top-level domain.

<?php
	$mail = file_get_contents("http://tel.exmail.qq.com/domain/xiaoz.me");
	echo $mail;
?>

2. Bind Domain and Resolve DNS

If your virtual host supports subdomains, you first need to create a subdirectory named mail (the folder name can be arbitrary). Then, add a subdomain mail.xiaoz.me and bind it to the mail directory you just created. Finally, resolve the host header mail to your host.

3. Upload the Script

Use an FTP tool or file manager to upload the index.php file created in Step 1 to the mail directory created in Step 2.

4. Test Access

If the above operations were performed correctly, you can now test access by entering your domain, for example: mail.xiaoz.me. If you still do not know how to proceed, please add XiaoZ's QQ for assistance.