Emailing with variable from address
I have a system where the 'from' address is entered by the user(s) so that it shows to the recipient as 'from' (this is important, as the recipient catalogues incoming emails by this address).
However on numerous occasions the user(s) inputs an incorrect email address in the form and using 'mail' via our organisations smtp servers this then appears as incorrect and non valid email address and bounces it and in turn the postmaster complains to me.
Q. Is there a way using UM to have a fixed "from" e.g. <firstname.lastname@example.org> so that the smtp server sees this and sends the email but the recipient sees <email@example.com> as both the 'sender' and 'reply to' address.
I have scanned php mail and think I might be able to use the -f parameter (I think, my php is not up to that level) it seems somehow modifying the envelope may have an way of doing this but it's beyond me. I appreciate this is probably a non starter but any advice or ideas would be well received.