EvilZone
Programming and Scripting => Web Oriented Coding => : Al Capone 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
-
Uhm I doubt you can use mail() on localhost. But I'm not sure.
In the past I had nothing but trouble with WAMP. I'd recommend to take a look at XAMPP.
-
thanks for the reply but nevermind bro, i fixed it :) now working with php mail() flawlessly.
-
Mind explaining how you fixed it?
-
yea sure. perhaps i'll make a tut on that in next 3-4 hrs. :)
-
yea sure. perhaps i'll make a tut on that in next 3-4 hrs. :)
Lol does it really warrant a full tutorial? If so then please do. It's good forum courtesy to explain how you fixed your errors so that future members may benefit.
-
yea sure. perhaps i'll make a tut on that in next 3-4 hrs. :)
Before making it can u just provide a direction through which it worked.i mean using a SMTP server on your machine or making changes in the wamp itself?
-
Uhm I doubt you can use mail() on localhost. But I'm not sure.
In the past I had nothing but trouble with WAMP. I'd recommend to take a look at XAMPP.
Sure you can:) you just need sendmail or something else installed (sendmail is usually preinstalled)
-
heres the TUT:
http://evilzone.org/web-oriented-programming/how-to-make-use-of-php-mail%28%29-function-in-windows-environment%28wamp%29/new/#new
-
Using the mail() function in PHP on most development environments will fail because there are no back-end mail server receiving the work. Most commonly this will fail on Windows, as Factionwars noted, sendmail is usually preinstalled with Linux).
One has to remember that the mail() function does very little. Its pretty much just a middle man between your app and the mail server. In order to get mail() to work on your machine you will need a mail server OR configure PHP to use a remote mail server.