This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Al Capone

Pages: [1]
2
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.php

please note that i've tested this only with gmail and it works flawlessly, i don't know about other email providers :/

1. go to
Code: [Select]
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:
Code: [Select]
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 :P

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:
Code: [Select]
[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



3
Web Oriented Coding / Re: Problem Using PHP mail() function in wamp
« on: January 01, 2014, 12:30:35 PM »
yea sure. perhaps i'll make a tut on that in next 3-4 hrs. :)

4
Web Oriented Coding / Re: Problem Using PHP mail() function in wamp
« on: January 01, 2014, 11:10:56 AM »
thanks for the reply but nevermind bro, i fixed it :) now working with php mail() flawlessly.

5
Web Oriented Coding / Problem Using PHP mail() function in wamp
« on: January 01, 2014, 10:42:07 AM »
i m having problem using the php mail function, i just get some kinda errors tho im pretty sure my code is working fine, after bit of googling, i found a solution about faking sendmail.exe but i can't seem to make it work..
pls can anyone who has done it in the past help me? thanks

- Al Capone

Pages: [1]


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.