Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 943
  • Last Modified:

Sending mail through jquery.contactable - mail.php

I have a cool jquery contact form (quick contact) that flys out from the side of my website.  I really like the look and feel but can't get it to actually send an email.  The code references a mail.php and I have placed it on a newly acquired virtual server from GoDaddy(Windows Server 2008 R2).  Is there a setting I have to put in place on the server to process a PHP page.  I have changed the settings in my file to the correct info as far as host server, username and password however, when I click the send it triggers the "please wait.." text and a progressbar.  It spends endlessly and never completes.  I cannot find any error message anywhere.  FYI: This functionality also fails in my development environment.(windows 7)

I believe I have IIS 7 on the server

view example:  www.crimsonsoftware.co

Thanks for any suggestions


<?php
 require_once "Mail.php";

 $from = "Mike Wilson <mike@xxxxxx.com>";
 $to = "Mike Wilson <xxxxxx@charter.net>";
 $subject = "Hi!";
 $body = "Hi,\n\nHow are you?";
 
 $host = "mail.xxxxxx.com";
 $username = "xxxxxxx";  
 $password = "xxxxxx";
 
 $headers = array ('From' => $from,
   'To' => $to,
   'Subject' => $subject);
 $smtp = Mail::factory('smtp',
   array ('host' => $host,
     'auth' => true,
     'username' => $username,
     'password' => $password));
 
 $mail = $smtp->send($to, $headers, $body);
 
 if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");
  } else {
   echo("<p>Message successfully sent!</p>");
  }
 ?>

Open in new window

0
mikewilson55
Asked:
mikewilson55
  • 3
1 Solution
 
Michel PlungjanIT ExpertCommented:
Here is an interesting discussion

http://forums.devarticles.com/web-hosting-45/php-mail-function-not-working-with-godaddy-com-90663.html

Sorry about the spam in the middle - not my site.
0
 
mikewilson55Author Commented:
Did not have PHP set up on new Windows Server 2008 R2.  I am going to get this installed properly and then try my Quick Contact form again.  I assume the mail.php will begin performing as expected but must test this afternoon.
0
 
mikewilson55Author Commented:
I have PHP installed and confirmed by navigating to http://localhost/phpinfo.php but still no luck sending an email using the mail.php.

Does anyone have an example of settings?

how does the mail.php in the jquery contable interact with the main php.ini.

Is it the php.ini I need to be setting smtp info in?

Where should the mail.php file be placed -
root of website?  
root of webserver?
main php folder on c-drive?

0
 
mikewilson55Author Commented:
not a complete solution but gave me direction
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now