Welcome Guest, Not a member yet? Register   Sign In
Sending Email Problems
#1

[eluser]the_one[/eluser]
Hi to everybody,

I am new to CodeIgniter, and i am following the tutorials on NET TUTS.
When i am trying to send a email with subject, message and attached file, i just receive a email with only the subject. Here is the code
Code:
$name  = $this->input->post('name');
$email = $this->input->post('email');

$this->load->library('email');
$this->email->set_newline("\r\n");
        
$this->email->from('[email protected]', 'Petar Blazevski');
$this->email->to($email);
$this->email->subject('Test Newsletter Singup Confirmation');
$this->email->message('You\'ve now singed up, fool!');
        
$path = $this->config->item('server_root');
$file = $path . '/CodeIgniter/attachments/yourInfo.txt';
        
$this->email->attach($file);

if($this->email->send()) {
   echo 'Email Send!';
} else {
   show_error($this->email->print_debugger());
}

and here is my configuration
Code:
$config['protocol']   = 'smtp';
$config['smtp_host']  = 'ssl://smtp.gmail.com';
$config['smtp_port']  = 465;
$config['smtp_user']  = '[email protected]';
$config['smtp_pass']  = '*******';

which is in a separate file in the config folder.

I don't know what am i doing wrong, can someone help me?
I am working on Ubuntu Linux
#2

[eluser]the_one[/eluser]
No one knows what is the problem???
#3

[eluser]InsiteFX[/eluser]
Try changing this:
Code:
$this->email->message('You\'ve now singed up, fool!');

To this:
Code:
$this->email->message("You\'ve now singed up, fool!");

InsiteFX
#4

[eluser]echoDreamz[/eluser]
[quote author="InsiteFX" date="1285327432"]Try changing this:
Code:
$this->email->message('You\'ve now singed up, fool!');

To this:
Code:
$this->email->message("You\'ve now singed up, fool!");

InsiteFX[/quote]

Those are both the same, the first one should work as he is escaping single quote with the backslash. The second one there is no need for the escape sequence as you are using double quotes, not single quotes.
#5

[eluser]the_one[/eluser]
[quote author="InsiteFX" date="1285327432"]Try changing this:
Code:
$this->email->message('You\'ve now singed up, fool!');

To this:
Code:
$this->email->message("You\'ve now singed up, fool!");

InsiteFX[/quote]

It's not working, i'm still getting email with only the subject and nothing more Sad.
I tried the same code on Windows and on Linux, the same problem exist Sad




Theme © iAndrew 2016 - Forum software by © MyBB