Whenever I send an e-mail to my clients, their mailbox shows the e-mail particulars of my server that's hosting this site, rather than the e-mail I mention within the from variable. something similar to this

 From John Smith username704@sadalsuud.hostingService.com

Things I want is

 From accounts@myWebsite.com

Assistance will be appreiated. I'm unaware whether it's a question more appropriate for mentioning in Serverfault. If that's the case, then tell me.

$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

What Narek states sometimes works, but type of is dependent from the configurations. I'd a simular problem previously using mail() and whatever i attempted, i sometimes got the hostname. It made an appearance to become a server(configurations) problem.

What did assist me to, was using Swiftmailer over SMTP ( http://swiftmailer.org/ ) rather. You need to try it out, it is a excellent script.