0

Hi all,
I have a simple contact info form written which when submitted sends the info to a php script which is supposed to then email on the details. The problem is that I can't seems to get the mail function to work correctly. I have php running on iis7 and have configured smtp email as per the windows website. When I tried running the following scripts it produces an error!

`<?php

if(mail('franklenehantesting@gmail.com', 'Test email from localhost', 'This works great!!'))
    echo 'Mail Sent';
else
    echo 'Error, something is wrong.';

?>`

Could anybody please shed some light on this situation for me, as I'm kinda at a lose at the moment!?

2
Contributors
3
Replies
10
Views
3 Years
Discussion Span
Last Post by pixelsoul
0

An important part to include in this would be the error message you're seeing.

Make sure the smtp settings are correct/enabled in your php.ini file as well.

0

Got it sorted, didn't have iis6 services setup correctly.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.