You can use PHPMailer php library to send email..
http://phpmailer.worxware.com/
<?php
require "[YOUR PATH TO PHPMAILER LIB]/class.phpmailer.php";
require "[YOUR PATH TO PHPMAILER LIB]/class.smtp.php";
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'mtp.host.com'; // Specify main SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '[email address to send email]'; // SMTP username
$mail->Password = '[above email password]'; // SMTP password
$mail->SMTPSecure = 'encryption type'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = [SMTP PORT]; // TCP port to connect to
$mail->From = '[FROM EMAIL]';
$mail->FromName = '[FROM NAME]';
$mail->addAddress([recipient email address], [recipient name]); // Add a recipient
$mail->addReplyTo([email protected], reply);
$mail->addAttachment([attachment path], [attachment name]);// name
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $subject;
$mail->Body = $body;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
?>