Reputation: 4815
Dont ignore if this sounds like a duplicate. I went through similar questions here but couldnt resolve my doubts.
Im developing a site in my localhost. Its coded in PHP. I need to send mail to my site's customers from my PHP script. I know we can use gmail smtp server for this. But due to the limit on the mail/day set by google, i prefer not to use them.
But my doubts are:
Thanks a lot!
EDIT: Im using wamp2.2 in my localhost.
Upvotes: 1
Views: 1323
Reputation: 759
to send email from php , simply use php's own mail function :
<?php
$to = "destinationemailid";
$subject = "mail subject";
$message = "your message to send";
$from = "sourceemailid";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?>
this works with xampp on localhost
Upvotes: 0
Reputation: 9833
If you use XAMPP, it comes with Mercury Mail. You can use that to send mails through localhost.
Upvotes: 2
Reputation: 132011
sendMail
could be sendmail
, which is itself a MTA-interface.Upvotes: 1