SOLVED Email error: a bytes-like object is required, not 'str'

nll

Cadet
Joined
Dec 16, 2021
Messages
2
Running: TrueNAS-12.0-U7

Im sorry if my formattingis bad Its the first time I could not find the answer for myself by searching forums/google. I think it may be a python error but I am not sure.

I have verified that DNS is working to speak to my mail server. I have checked and reset the smtp server settings in the GUI.

How I send does not seem to matter.
A test email from the GUI fails with "Error: [EFAULT] Failed to send email: a bytes-like object is required, not 'str' and puts it in the maillog
Trying to send from the command line like: echo "Hello" | mail -s "Test" email@example.com returns nothing but this error is in the maillog:
nas.tisd.net middlewared 795 - - Failed to send email to email@example.com: a bytes-like object is required, not 'str'

Thank you for your time!
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
Running: TrueNAS-12.0-U7

Im sorry if my formattingis bad Its the first time I could not find the answer for myself by searching forums/google. I think it may be a python error but I am not sure.

I have verified that DNS is working to speak to my mail server. I have checked and reset the smtp server settings in the GUI.

How I send does not seem to matter.
A test email from the GUI fails with "Error: [EFAULT] Failed to send email: a bytes-like object is required, not 'str' and puts it in the maillog
Trying to send from the command line like: echo "Hello" | mail -s "Test" email@example.com returns nothing but this error is in the maillog:
nas.tisd.net middlewared 795 - - Failed to send email to email@example.com: a bytes-like object is required, not 'str'

Thank you for your time!
Yea, that sounds like a bug for sure. Go ahead and file a ticket on https://jira.ixsystems.com
 

nll

Cadet
Joined
Dec 16, 2021
Messages
2
I managed to fix this myself. I changed the password of the user I use to send mail on my mail server and started getting auth messages. I then changed the password in the GUI to the new password and now it works.

Thanks for looking!
 
Top