CodeIgniter Forums

Full Version: Email error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I use the email library to send emails.
I have an email.php file in my config map:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['protocol'] = 'smtp';
$config['smtp_host'] = '';
$config['smtp_port'] = '2525';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'xxx';
$config['mailtype'] = 'html';
$config['charset'] = ' iso-8859-1';

And the code in my controller:


$naam = $this->input->post('name');
$email = $this->input->post('email');
$onderwerp = $this->input->post('onderwerp');
$data['bericht'] = $this->input->post('bericht');

$this->email->from($email, $naam);
$this->email->to('[email protected]');
$this->email->message($this->load->view('emails/emailinfo', $data, TRUE));

$data['content'] = 'emailSend';
$data['title'] = 'Myrelle - email verzonden';
$this->load->view('template/template', $data);

But i have errors:

A PHP Error was encountered
Severity: Warning
Message: fsockopen(): unable to connect to (Connection timed out)
Filename: libraries/Email.php
Line Number: 1689

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /customers/b/8/4/
Filename: core/Common.php
Line Number: 438

This is a multi-part message in MIME format. Your email application may not support this format.

Can someone help me?


El Forum

El Forum

[quote author="john_j" date="1344610819"][/quote]

I try this, everything works on my localhost, but not online...