in reply to mail counter

PHP's own mail() functions don't actually implement any mail functionality, they just call your local sendmail in the background. If you want similar functionality to mail() in PHP, why not try Mail::Sender?