Msmtp transmits mails unaltered to the SMTP server, with the following exceptions:
The Bcc header(s) will be removed. This behavior can be changed with the remove_bcc_headers command and --remove-bcc-headers option.
A From header will be added if the mail does not have one. This can be changed with the set_from_header command and --set-from-header option. The header will use the envelope from address and optionally a full name set with the -F option.
A Date header will be added if the mail does not have one. This can be changed with the set_date_header command and --set-date-header option.
When undisclosed_recipients is set, the original To, Cc, and Bcc headers are removed and replaced with "To: undisclosed-recipients:;".
The email address in the From must match the smtp email address you used in your msmtprc for the email provider. The email address in the To can be anything, but if you don’t have the line in the text file, you will receive the email with Undisclosed recipients:; on the received email.