An SMTP problem

the mail() function

Moderators: egami, macek, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Fri Nov 23, 2012 2:43 pm

You probably don't have a mail server setup/running. It's not a big deal, and it's one easily rectified. The easiest thing to do would be to look up instructions for using mail() with a remote smtp server, and then configure your php to use an external server like gmail with an existing account. or you can just say "oh, that's why it doesn't work when i run it locally" and move on to chapter 2. The first is the 'official' answer, the second is the route i chose when faced with the same problem (except was developing locally before pushing to a live site) Rather than waste time making it work locally, i held off on troubleshooting mail until the script was in place with a mail server and working credentials, and then it worked fine.

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Mon Nov 26, 2012 10:07 am

Glad to help, and I know how frustrating that part is, I think i spent a few hours trying to make it work locally on mine before i understood the problem enough to ignore it. lol

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests