[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Need help with configuring local pc with IIS to send email so I can test PHP scripts

Asked by alicia1234 in PHP Scripting Language, Microsoft IIS Web Server

I've been using php for a while but this is the first time I've wanted to send email from a php script. I was hoping to be able to test it on my local server but I can't quite figure out how to configure it. What happens is that when I run the script, nothing really happens. The script completes without any error messages. I don't get the email, and I don't see any errors in the W3SVC1 log file (under windows\system32\logfiles).

What I have:
Windows XP Pro SP3
IIS 5.1

What I've done:
I did not have the Simple Mail Transfer Protocol (SMTP) service started so I started it.
In IIS, I have the "Default SMTP Virtual Server".
Under "Relay Restrictions" it has "Only the list below", with nothing in the list. The checkbox for "Allow all computers which successfully authenticate to relay, regardless of the list above" is checked.
I basically have not changed any of the default settings.

PHP has SMTP set to localhost, port 25.

None of the directories under c:\inetpub\mailroot have anything in them.

I really don't know what I'm supposed to do. I've been searching the web and reading help files but it's all greek to me.

I don't think there's a problem with my code, but I'm posting it anyways. The constant "EMAIL_ADDR_CCA" is defined to be my own Verizon email address.

I really could use some help/direction on what I need to do to be able to test sending mail from a php script on my localhost.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
<?php
// compose email
$to = EMAIL_ADDR_CCA;
$subject = 'Insurance Information Request';
 
$body = 'The following inquiry has been received:' . '<br />';
 
$body .= $firstname . ' ' . $lastname . '<br />';
$body .= $organization . '<br />';
$body .= $address1 . '<br />';
if (!is_null($address2)) { $body .= $address2 . '<br />'; }
$body .= $city . ', '. $state . ' ' . $postalcode . '<br />';
$body .= $phone1ac . '-' . $phone1ex . '-' . $phone1num . '<br />';
if (!is_null($phone2ac) && !is_null($phone2ex) && !is_null($phone2num)) {
	$body .= $phone2ac . '-' . $phone2ex . '-' . $phone2num . '<br />'; }
$body .= $email . '<br />';
$body .=  '<br />';
$body .= 'Sector: ' . $sector_text;
if ($sector == SECTOR_OTHER) { $body .= ' - ' . $sectorother; }
$body .= '<br />';
$body .= 'Registered 501(c)3? ' . $reg501c . '<br />';
$body .= 'Own/Rent: ' . $ownrent . '<br />';
$body .= 'Annual Revenue: ' . $revenue . '<br />';
$body .= 'Number of Employees: ' . $numemps . '<br />';
$body .= 'Number of Locations: ' . $numlocs . '<br />';
$body .= 'Number of Vehicles: ' .$numvehicles . '<br />';
$body .= '<br />';
 
//send email
mail ($to, $subject, $body);
?>
[+][-]07/03/09 02:38 PM, ID: 24774532Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07/03/09 03:19 PM, ID: 24774738Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/03/09 04:13 PM, ID: 24774905Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/03/09 04:41 PM, ID: 24774951Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/03/09 04:46 PM, ID: 24774960Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/10/09 06:27 AM, ID: 24823004Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: PHP Scripting Language, Microsoft IIS Web Server
Sign Up Now!
Solution Provided By: alicia1234
Participating Experts: 3
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_EXPERT_20070906