If you are getting a white page there is probably a php error occurring and you have error reporting turned off. To enable error reporting add this code to the top of your page then test it again:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
As for setting the from flag you should not need to do this in the code, but from the interface directly. If you click on the mail object settings button (envelope icon) you will have a check box option for setting this from parameter. I'm including a screen shot of this interface with the box checked. Please post back with more detail if the error message is not clear and something that you can resolve.