Help with contact form

edited July 2012 in Feature Requests
Hi,

I am using your contact form and when I try to send an email on my local machine the page just hangs saying connecting on the browser tab (Firefox).

My controller and view are the same as your example.

My email.config file: (Settings I use in another codeigniter site that work fine)
$config['wordwrap'] = TRUE; /*Local*/ $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config['smtp_port'] = '465'; $config['smtp_timeout'] = '7'; $config['smtp_user'] = 'sigalzahav@gmail.com'; $config['smtp_pass'] = '*********';

My_config file:
date_default_timezone_set('Africa/Johannesburg'); // used for development and testing $config['dev_mode'] = TRUE; $config['dev_email'] = 'sigalzahav@gmail.com'; // for debugging... there is a hook in place to turn this on $config['enable_profiler'] = FALSE;

I tried to change the dev_mode to FALSE, still, nothing happens.

What am I doing wrong?

Comments

  • edited 2:11AM
    Try removing this extra check on line 16 of the contact controller:
    AND $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']
  • edited 2:11AM
    Tried that, the page still hangs.
  • edited 2:11AM
    Are you able to debug the contact controller to see what line of code is causing it to hang for you?
  • edited 2:11AM
    ( ! ) Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\www\clarenssaNewFuel\fuel\codeigniter\libraries\Email.php on line 1839
    Call Stack
    # Time Memory Function Location
    1 0.0009 398128 {main}( ) ..\index.php:0
    2 0.0024 462216 require_once( 'C:\wamp\www\clarenssaNewFuel\fuel\codeigniter\core\CodeIgniter.php' ) ..\index.php:236
    3 0.0901 3437416 call_user_func_array ( ) ..\CodeIgniter.php:318
    4 0.0901 3437464 Contact->index( ) ..\CodeIgniter.php:0
    5 0.1073 4238920 Contact->_process( ) ..\contact.php:17
    6 0.1744 4800368 CI_Email->send( ) ..\contact.php:91
    7 0.1749 4801816 CI_Email->_spool_email( ) ..\Email.php:1370
    8 0.1749 4802032 CI_Email->_send_with_smtp( ) ..\Email.php:1501
    9 4.3389 4814880 CI_Email->_get_smtp_data( ) ..\Email.php:1644
  • edited 2:11AM
    Are you able to send it with different Email configuration settings?
  • edited 2:11AM
    I can send it online. I can't test it locally. Although these email setting are working with a codeigniter site I have.
  • edited 2:11AM
    So the issue is only when sending locally from your machine? Does this thread help?
    http://codeigniter.com/forums/viewthread/184596/#877153
  • edited 2:11AM
    YES !!! Halelluia, that helped: $config['crlf'] = "\r\n";

    I was googling this issue for hours yesterday, all the posts I found didn't mention this fix.

    Thank you !
Sign In or Register to comment.