# 作业异常：认证类型错误，None

**URL:** https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516
**Category:** Support
**Created:** [2016年八月11日 17:33 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516 "2016-08-11T17:33:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Dan\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan_g/32/114732_2.png) [@Dan\_G](https://meta.discourse.org/u/Dan_G)
#### Post date: [2016年八月11日 17:33 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516/1 "2016-08-11T17:33:30Z")

</div>

I have the error in the title of this post when Discourse tries to send emails (so I couldn’t complete my initial setup). I do not want discourse to try to authenticate at all against the SMTP service so I set this setting in my app.yml:

```
DISCOURSE_SMTP_AUTHENTICATION: none

```

Why is it still trying to authenticate?

---

<div class="post-metadata">

### Author: ![Dan\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan_g/32/114732_2.png) [@Dan\_G](https://meta.discourse.org/u/Dan_G)
#### Post date: [2016年八月11日 18:43 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516/2 "2016-08-11T18:43:36Z")

</div>

I fixed my issue. I removed “required” settings like username and password that make no sense in an unauthenticated context and rebuilt. It now works just fine!

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [2016年八月12日 15:43 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516/3 "2016-08-12T15:43:39Z")

</div>

On my config, which also uses unauthenticated email, I “removed” by replacing with a double quoted empty string: `""`

I don’t know if that is more or less than needed, since I don’t have a strong sense of YML. But I know that trick works in a lot of computer contexts for “zero length string”.

---

<div class="post-metadata">

### Author: ![Dan\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan_g/32/114732_2.png) [@Dan\_G](https://meta.discourse.org/u/Dan_G)
#### Post date: [2016年八月13日 04:13 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516/4 "2016-08-13T04:13:09Z")

</div>

> [@elijah](#):
>
> I don’t know if that is more or less than needed, since I don’t have a strong sense of YML.

Removing keys in YAML has the same effect as removing them in JSON. It’s up to the code that reads the data to decide what it wants to do with them. I found someone on the forum that removed the keys so I did likewise.

---

<div class="post-metadata">

### Author: ![anthony-o](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@anthony-o](https://meta.discourse.org/u/anthony-o)
#### Post date: [2017年一月16日 15:35 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516/5 "2017-01-16T15:35:15Z")

</div>

> [@Dan\_G](#):
>
> I removed “required” settings like username and password

Could you explain what you did exactly? Because I think I’ve tried your solution without any success like [I explain here](https://meta.discourse.org/t/cant-use-none-discourse-smtp-authentication/55833/2).

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:45 UTC](https://meta.discourse.org/t/job-exception-wrong-authentication-type-none/48516/6 "2024-06-08T12:45:01Z")

</div>

此主题在 2857 天后自动关闭。不再允许回复。
