# 如何配置SMTP邮件设置？

本镜像建议使用第三方的SMTP镜像邮件发送，具体步骤如下：

1. 以QQ邮箱为例，将如下参考拷贝到GitLab配置文件，需要注意的是密码中不能包含单引号，否则出错

   ```
   gitlab_rails['smtp_enable'] = true
   gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
   gitlab_rails['smtp_port'] = 465
   gitlab_rails['smtp_user_name'] = "xxxx@xx.com"
   gitlab_rails['smtp_password'] = "password"
   gitlab_rails['smtp_authentication'] = "login"
   gitlab_rails['smtp_enable_starttls_auto'] = true
   gitlab_rails['smtp_tls'] = true
   gitlab_rails['gitlab_email_from'] = 'xxxx@xx.com'
   ```
2. 重启配置文件服务

   ```
   [root@iZbp1i4rjdsy216yq7lgucZ ~]# sudo gitlab-ctl reconfigure
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://websoft9.gitbook.io/gitlab-image-guide/gitlab-jing-xiang-shou-ce-1/ru-he-pei-zhi-smtp-you-jian-she-zhi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
