I wrote a script similiar to your needs in perl. It was initially built as a joke script where I could specify the to and from address. Of course the real sender info is hidden in the headers, and easily obtained, although there are still lots of people that don't know about that.
Say for e.g that my real email was: me@myvalid.com
When I said for eg. mailto sean@invalid.com
from kerry@valid.com
It was unsuccesful because to mailto address was incorrect, but it didn't send the mail back to me, it actually sent it to kerry@valid.com
This is were karma comes in to play and my joke bit me in my ass. Because unfortunately for me Kerry did know about header info and easily traced the practical joke email back to me.
Why not try changing the from address to a valid email address and the to address to an invalid email address and see if this will be the same case for you.
Hope this long winded almost useless info has some use to you.
Sean.