I am a beginner with PHP, but I wish to send mails to @yahoo.com, @gmail.com and the other emails such as these. I have read some lessons, however i don`t possess a SMTP server (I do not know what's that), but I have read somewhere that you'll be able to send via GMail (smtp.gmail.com). How's this possible ?
I am running an Apache server on Home windows 7.
I've implemented msmtp.sourceforge.net inside my Home windows 7 atmosphere coupled with a google account, works wonderful.
The configuration file you'll need for Gmail is as follows: A system wide configuration is optional. # If it exists, it usually defines a default account. # This allows msmtp to be used like /usr/sbin/sendmail. account default # The SMTP smarthost. host smtp.gmail.com domain smtp.gmail.com tls on tls_certcheck off tls_starttls on auth on user email@example.com from firstname.lastname@example.org password yourpasswordhere port 587 logfile C:\msmtp\msmtplog.txt # Construct envelope-from addresses of the form "email@example.com". auto_from on maildomain firstname.lastname@example.org
Additional information can be obtained inside the documentation deliver to msmtp but essentially using the downloaded file, this configuration along with a slight adjustment towards the php.ini file you ought to be all set.
You should use PHPMailer to get it done. This is a tutorial