Solved

Sending mail through jquery.contactable - mail.php

Posted on 2011-03-20
4
930 Views
Last Modified: 2012-05-11
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
Comment
Question by:mikewilson55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 35178547
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
 

Author Comment

by:mikewilson55
ID: 35198546
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
 

Author Comment

by:mikewilson55
ID: 35211262
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
 

Author Closing Comment

by:mikewilson55
ID: 36142963
not a complete solution but gave me direction
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question