Author Topic: Problem Using PHP mail() function in wamp  (Read 1456 times)

0 Members and 1 Guest are viewing this topic.

Offline Al Capone

  • /dev/null
  • *
  • Posts: 7
  • Cookies: 0
    • View Profile
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

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Problem Using PHP mail() function in wamp
« Reply #1 on: January 01, 2014, 11:04:01 am »
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.

Offline Al Capone

  • /dev/null
  • *
  • Posts: 7
  • Cookies: 0
    • View Profile
Re: Problem Using PHP mail() function in wamp
« Reply #2 on: January 01, 2014, 11:10:56 am »
thanks for the reply but nevermind bro, i fixed it :) now working with php mail() flawlessly.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Problem Using PHP mail() function in wamp
« Reply #3 on: January 01, 2014, 11:30:59 am »
Mind explaining how you fixed it?

Offline Al Capone

  • /dev/null
  • *
  • Posts: 7
  • Cookies: 0
    • View Profile
Re: Problem Using PHP mail() function in wamp
« Reply #4 on: January 01, 2014, 12:30:35 pm »
yea sure. perhaps i'll make a tut on that in next 3-4 hrs. :)

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Problem Using PHP mail() function in wamp
« Reply #5 on: January 01, 2014, 10:02:58 pm »
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.
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline Anks

  • Serf
  • *
  • Posts: 26
  • Cookies: -5
    • View Profile
Re: Problem Using PHP mail() function in wamp
« Reply #6 on: January 02, 2014, 08:55:26 am »
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?
AS578

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: Problem Using PHP mail() function in wamp
« Reply #7 on: January 02, 2014, 09:13:18 am »
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)
~Factionwars


Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: Problem Using PHP mail() function in wamp
« Reply #9 on: January 02, 2014, 07:25:10 pm »
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.
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true