troubleshooting Question

PHP.ini and SMTP

Avatar of AEII
AEII asked on
PHPMicrosoft IIS Web Server
8 Comments1 Solution2516 ViewsLast Modified:
I have been reading posts regarding the php.ini as well as emailing ...

I have listed this question in other areas as well, but the question I believe has morphed to this one ... and no one is responding to my others ...

PHP.ini ... I have read posts from the past and it they say the php.ini must be in the Windows
directory ... mine is not, never has been, and php is running fine on my Windows 2003 SBS Server with IIS 6.

I also know now that e-mail can be sent from the server by going through the process of Telnet.
I was able to send the e-mail fine ... and I received it on my workstation's client.

Is the following the issue and if so how is this added to the php.ini ?

The SMTP Server requries authentication ...  is this what is not allowing the script from the e-mail not work ...

[mail function]
; For Win32 only.
SMTP = smtp.myaccount.com
smtp_port = 25


This all started from creating a simple contact form in Flash to send the e-mail through the server rather than the user's client side e-mail ... I belive the form is very simple and I think it works ...
the script file for the php is listed below but I don't see anything wrong with it either ...

This is why I am back to thinking it is the php.ini ?

email.php Script:
{
            $mailTo = "trp@aeii.net";
            $mailSubject = "[Contact] Website Contact from - (" . $_POST['name'] . ")";
            
            $Header = "MIME-Version: 1.0\r\n";
            $Header .= "Content-type: text/html; charset=iso-8859-1\r\n";
            $Header .= "From: " . $_POST['email'] . "\r\n";
            
            $output = "<BR>";
            $output .= "From    : " . $_POST['name'] . "<BR><BR>";
            $output .= "Email   : " . $_POST['email'] . "<BR><BR>";
            $output .= "Message : " . $_POST['message'] . "<BR><BR>";
            
            $output = nl2br($output);
            
            if (mail($mailTo, $mailSubject, stripslashes($output), $Header))
            {
                  echo("&result=1&");
            }
            else
            {
                  echo("&result=2&");
            }
      }
      else
      {
            echo("This script runs only in Flash!!!");
      }
?>
ASKER CERTIFIED SOLUTION
m1tk4

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros