I'm using windows 7 and wamp server on my computer. I want to send email from my local host and i write the php code like the following

<?php
    $to = 'dagtade@gmail.com';
    $subject = 'test_subject';
    $message = 'test_message';
    mail($to,$subject,$message);
?>

the above code neither displays error message nor sends the email to dagtade@gmail.com. Is there any one who can help me?
thank you for your help.

WAMP does not include a mail server. Without it, you cannot send emails out. If you really need this, you can have a look at Mercury. Another option would be to use a class like PHPMailer, so you can use your gmail account to send emails.

Hi pritaeas
Thank you for your comment. but i've no idea about PHPMailer. could you tell me what is it and what it is used for?
best reagards,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.