As the title say !!
I assume you use xampp based on your question asked, and this should help you XAMPP Sendmail using Gmail account - Stack Overflow