This is my first time making a tutorial so i apologize if you find it awfullly formatted or bad grammar. english isnt my native language
well, this tutorial is about using the php mail() function on a windows development environment specifically WAMP.
for those who don't know about the PHP mail() function, its a function that makes it possible to send emails with our php script. more details here:
http://php.net/manual/en/function.mail.phpplease note that i've tested this only with gmail and it works flawlessly, i don't know about other email providers :/
1. go to
http://glob.com.au/sendmail/
2. download sendmail. its archive so extract its contents to c:/wamp/bin/sendmail
3. navigate to
c:/wamp/bin/sendmail and open '
sendmail.ini' with a text editor.. i used notepad
4.look for the lines below and edit them accordingly:
smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=tls
auth_username=youremailaddresses@gmail.com
auth_password=youremailpassword
don't forget to save after editing
5.open php.ini with a text editor, i also used notepad. and use the find function to look for
[mail function] excluding quotes pls.
6.you should have something like this:
[mail function]
; For Win32 only.
; http://php.net/smtp
; SMTP =
; http://php.net/smtp-port
; smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
; sendmail_from = an email address that is already there
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).
; http://php.net/sendmail-path
sendmail_path = C:/wamp/bin/sendmail/sendmail.exe -t
notice the semi colons and ensure that you edit the "
sendmail_path" property and give value as "
C:/wamp/bin/sendmail/sendmail.exe -t".
now save. close wamp and restart it and voila, you can now make use of
php mail() function on your wamp.
I TAKE NO CREDITS FOR THIS TUT. ALTHOUGH I WROTE IT, ITS A RESULT OF HRS OUF SEARCHING GOOGLE :d