Do you really need to add the credentials here? Try without them so smptmail will try to use auth-source to retrieve the credentials.
These are my smtpmail settings: (use-package smtpmail :config (setq smtpmail-default-smtp-server "smtp.server.de" smtpmail-smtp-server "smtp.server.de" smtpmail-smtp-service "465" smtpmail-stream-type 'ssl smtpmail-servers-requiring-authorization ".*")) For me these work like this, smtpmail will try to retrieve the localdomain and sendto-domain by itself. If you add either to the hosts file they should be fine. Br, Björn