Is there a fake sendmail in linux?? i badly want it

i used to use fake sendmail to relay the mails to stunnel and stunnel used to mail it to gmail's servers and thats how my mail function worked but now in linux i hope there is something that simply takes mail's from the PHP mail function and sends it to stunnel.....

-Lokesh