# Can not use sendmail for email notification

**URL:** <https://forum.gitea.com/t/can-not-use-sendmail-for-email-notification/3158>\
**Category:** Install/Maintain/Configure\
**Created:** [April 9, 2021, 2:00am UTC](https://forum.gitea.com/t/can-not-use-sendmail-for-email-notification/3158 "2021-04-09T02:00:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hllee451](https://avatars.discourse-cdn.com/v4/letter/h/35a633/32.png) [@hllee451](https://forum.gitea.com/u/hllee451)\
**Post date:** [April 9, 2021, 2:00am UTC](https://forum.gitea.com/t/can-not-use-sendmail-for-email-notification/3158/1 "2021-04-09T02:00:08Z")

</div>

I am running Gitea on Ubuntu 16.04 and trying to enable email notification. In app.ini I configured it to use sendmail by setting the mailer section as

```
[mailer]
ENABLED = true
FROM = gitea@ourdomain.com
MAILER_TYPE = sendmail
SENDMAIL_PATH = /usr/sbin/sendmail

```

But when I clicked on the “Send Testing Email” on the Site Administration \> Configuration page, I got the following error message:

`Failed to send a testing email to 'xxx@ourdomain.com': gomail: could not send email 1: fork/exec /usr/sbin/sendmail: no such file or directory`

I’ve verified that /usr/sbin/sendmail exists and is working fine. Does anyone have suggestion on what might have caused this error?

---

<div class="post-metadata">

**Author:** ![ghrom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/ghrom/32/4267_2.png) [@ghrom](https://forum.gitea.com/u/ghrom)\
**Post date:** [December 13, 2023, 1:32pm UTC](https://forum.gitea.com/t/can-not-use-sendmail-for-email-notification/3158/2 "2023-12-13T13:32:26Z")

</div>

Same error happens with Ubuntu 22.04 and latest Gitea 1.21.1 from snap. Why?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [December 19, 2023, 10:56am UTC](https://forum.gitea.com/t/can-not-use-sendmail-for-email-notification/3158/3 "2023-12-19T10:56:17Z")

</div>

Does the git user has permission to invoke sendmail?
