Can't send emails because of permissions

When I try to compose an email on neomutt, the editor crashes due to permissions with this output:

sh: line 1: /tmp/neomutt-nixos-1000-151768-10911910329114902773: Permission denied

I can read emails, no problem, but I cannot open the editor for composing emails. I tried setting up notmuch for emacs instead, and it gives me a different error that indicates, it is not even using the right send command (these two things could be unrelated, but I am not sure).

The error from emacs is:

sendmail: server message: 450 4.1.8 <sour@nixos.mail-host-address-is-not-set>: Sender address rejected: Domain not found
sendmail: could not send mail (account default from /home/sour/.config/msmtp/config)

The account default from /home/sour/.config/msmtp/config is certainly set, and is not sour@nixos.mail-host-address-is-not-set, and is apparently set correctly with the primary email because I am receiving emails just fine, so I don’t know where to go from here.