Part of the EllisLab Network
   
 
Email Problems
Posted: 03 January 2009 04:17 PM   [ Ignore ]  
Summer Student
Total Posts:  11
Joined  12-13-2008

Hello,

i will use the Email class to send emails via codeigniter.

But when i send the form i have the following errors:

A PHP Error was encountered
Severity
: Notice

Message
: Undefined index: From

Filename
: libraries/Email.php

Line Number
: 1254

A PHP Error was encountered
Severity
: Notice

Message
: Undefined index: From

Filename
: libraries/Email.php

Line Number
: 918
A PHP Error was encountered
Severity
: Notice

Message
: Undefined index: Return-Path

Filename
: libraries/Email.php

Line Number
: 569

A PHP Error was encountered
Severity
: Notice

Message
: Undefined index: Subject

Filename
: libraries/Email.php

Line Number
: 937

A PHP Error was encountered
Severity
: Notice

Message
: Undefined index: From

Filename
: libraries/Email.php

Line Number
: 1444

A PHP Error was encountered
Severity
: Warning

Message
: mail() expects parameter 1 to be string, array given

Filename
: libraries/Email.php

Line Number
: 1444

 


This is my php code:

$this->load->library('email');
            
$this->load->helper('email');

            if(!
$this->input->post('mail') || !valid_email($this->input->post('mail')))
                
$data['error'] = 1;
            elseif(!
$this->input->post('name')) $data['error'] = 2;
            elseif(!
$this->input->post('message')) $data['error'] = 3;
            
else{

                $this
->email->from($this->input->post('mail'), $this->input->post('name'));
                
$this->email->to('kontakt@....de');
                
                
$this->email->subject('HP Anfrage');
                
$this->email->message($this->input->post('message'));    
                
                
$config['smtp_host'] = ...;
                
$config['smtp_user'] = '...';
                
$config['smtp_pass'] = '...';
                
                
$this->email->initialize($config);
                
$this->email->send();
                
$data['ready'] = true;    
            
}

I have valdiate the parameters for all email functions and tested via echo,..

Is anybody here who can tell me the Problem?

Thank you very much.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 77577 Total Logged-in Users: 24
Total Topics: 101563 Total Anonymous Users: 3
Total Replies: 544414 Total Guests: 225
Total Posts: 645977    
Members ( View Memberlist )