Welcome Guest, Not a member yet? Register   Sign In
E-mail Class Problem
#1

[eluser]Ricardo Machado[/eluser]
I have the following code:

Code:
this->load->library('email'); # LOAD THE LIBRARY
                    
# HERE I SET THE INFO    
$info=array(
    "useragent"=>"useragent",
    "protocol"=>"smtp",
    "smtp_host"=>"smtp.server.com",
    "smtp_user"=>"[email protected]",
    "smtp_pass"=>"password",
    "smtp_port"=>"25",
    "smtp_timeout"=>300,
    "mailtype"=>"html",
    "charset"=>"iso-8859-1"
);
$this->email->initialize($info); # HERE I INITIALIZE IT
                        
                        
# SET THE NORMAL HEADERS & INFO (message,subject, bla bla)
$this->email->from('[email protected]','Sistema de Contactos Darque Peças');
$this->email->to('[email protected]');
$this->email->reply_to($this->input->post('from_email'), $this->input->post('from'));
$this->email->subject($this->input->post('subject'));
$this->email->message($this->input->post('message'));
$this->email->send();

I don't know why, but the script keeps givin' me some warning/errors about the From and the Return-Path headers. Keeps sayin' they are not set...

When I make a var_dump($this->_headers); in the class I can see that they have not been set as they supposed to be between the function from() and the function _set_header()....

Is this error caused by me, or is it a 'bug' ? :X

Any help would be appreciated, thanks in advance...
#2

[eluser]ericsodt[/eluser]
Try $this->input->get_post('<attribute'>);

I believe it is 'get_post' might want to look in the Input class and make sure, but that should do it...


[quote author="Ricardo Machado" date="1229559325"]I have the following code:

Code:
this->load->library('email'); # LOAD THE LIBRARY
                    
# HERE I SET THE INFO    
$info=array(
    "useragent"=>"useragent",
    "protocol"=>"smtp",
    "smtp_host"=>"smtp.server.com",
    "smtp_user"=>"[email protected]",
    "smtp_pass"=>"password",
    "smtp_port"=>"25",
    "smtp_timeout"=>300,
    "mailtype"=>"html",
    "charset"=>"iso-8859-1"
);
$this->email->initialize($info); # HERE I INITIALIZE IT
                        
                        
# SET THE NORMAL HEADERS & INFO (message,subject, bla bla)
$this->email->from('[email protected]','Sistema de Contactos Darque Peças');
$this->email->to('[email protected]');
$this->email->reply_to($this->input->post('from_email'), $this->input->post('from'));
$this->email->subject($this->input->post('subject'));
$this->email->message($this->input->post('message'));
$this->email->send();

I don't know why, but the script keeps givin' me some warning/errors about the From and the Return-Path headers. Keeps sayin' they are not set...

When I make a var_dump($this->_headers); in the class I can see that they have not been set as they supposed to be between the function from() and the function _set_header()....

Is this error caused by me, or is it a 'bug' ? :X

Any help would be appreciated, thanks in advance...[/quote]




Theme © iAndrew 2016 - Forum software by © MyBB