Send email as a different user than the user logged in

Hi
I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in.

something like do-not-reply@xyz.com

Thank you.

try sendmail with -f option. Note: if you are not root then 'X-Authentication-Warning' appears in the mail header. This may not show in the mail reader. Some anti-spam apps block email headers like that.