Check result from mail(). If it returns false then message failed.
To get error message don't add @ before mail(). Before calling mail(), set error_reporting() to show warnings and set custom error parser using set_error_handler(). Then after mail() use set_error_handler() and error_reporting() again with first parameter set to whatever parameters it returned in last call to set error level and parser back to what it was before your code.
For example of error handler check phpBB 3 code, for example of error reporting change look in compiled tpl files from extreme styles mod.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.