Solved

Sending mail through jquery.contactable - mail.php

Posted on 2011-03-20
4
918 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
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Runtime Error 2 28
URL Redirect using IIS v8 4 25
C#  Radio button search for Date not DateTime 4 35
Is it possible to host a website on a windows vps 4 29
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

896 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now