# 更改电子邮件地址确认电子邮件未发送，但其他所有通知电子邮件均已发送

**URL:** https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358
**Category:** Support
**Created:** [2020年九月25日 12:31 UTC](https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358 "2020-09-25T12:31:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2020年九月25日 12:31 UTC](https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358/1 "2020-09-25T12:31:31Z")

</div>

你好。

我的 **禁用邮件** 设置已设为 **非工作人员** 。

所有邮件通知（针对工作人员…）似乎都已发送，但用户更改电子邮件（或添加备用地址）的确认邮件除外。

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/f/afd843db86cb6d3f173800825fefe74733553277.png)

![image](https://global.discourse-cdn.com/meta/original/3X/e/a/ea3498c45e0abb3652e9857fffe4503135e8af68.png)

在 管理面板 → 邮件 → 已发送邮件 中没有出现新的邮件记录。

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/d/6df984aeb4aa9356ab6f5430bf493a9f13b00e75.png)

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2020年九月28日 09:10 UTC](https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358/2 "2020-09-28T09:10:59Z")

</div>

只有将 **禁用邮件** 设置为 **否** 时，它才开始正常工作，所以我想这里存在一个 bug，或者我是不是漏掉了什么？

简而言之：当 **禁用邮件** 设置为 **非员工** 时，对于员工或管理员成员，不会发送邮箱地址变更确认邮件（即发送给 **新** 地址的邮件）。

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2020年九月28日 16:48 UTC](https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358/3 "2020-09-28T16:48:29Z")

</div>

[quote=“Canapin, 帖子：2, 主题：165358”]  
简而言之：当将 **禁用邮件** 设置为 **非工作人员** 时，针对工作人员或管理员成员，不会发送电子邮件地址变更确认邮件（即发送至 **新** 地址的邮件）。[/quote]

嗯，@martin，也许你也可以尝试复现一下这个问题？

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2020年十月8日 03:52 UTC](https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358/5 "2020-10-08T03:52:34Z")

</div>

此问题的修复现已合并：

> <https://github.com/discourse/discourse/pull/10794>
>
> See https://meta.discourse.org/t/email-address-change-confirmation-email-not-sen…t-but-every-other-notification-emails-are/165358
> 
> \> In short: with disable emails set to non-staff, email address change confirmation emails (those sent to the new address) are not sent for staff or admin members.
> 
> This was happening because we were looking up the staff user with the \`to\_address\` of the email, but the to address was the \_new\_ email address because we are sending a confirm email change email, and thus the user could not be found. We didn't need to do this anyway because we are passing the user into the \`Email::Sender\` class anyway.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2020年十月8日 03:52 UTC](https://meta.discourse.org/t/email-address-change-confirmation-email-not-sent-but-every-other-notification-emails-are/165358/6 "2020-10-08T03:52:38Z")

</div>


