Welcome Guest, Not a member yet? Register   Sign In
Email Error
#11

[eluser]penta997[/eluser]
I have problem with sending email too. The mail is sending correctly, but in my mail box do not displays a content, instead this, it displays error:
Quote:This is the mail system at host werewolf2.cba.pl.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

This is a sending function:
Code:
function send_email()
      {
             $suma = $this->sum_all();
             $ilosc = $this->counter();
             $usr = $this->session->userdata('username');
             $this->load->library('email');
             $cli = $this->Users_model->get_userdata($usr);
             $item = $cli->row();
             $this->email->from($item->CLI_Email, $item->CLI_Name.' '.$item->CLI_LastName);
             $this->email->to('[email protected]');
             $this->email->subject('Uzytkownik: '.$usr.'zakupił przedmiot');

            $data['email'] = 'Uźytkownik: '.$usr.' zakupił: '.$ilosc.' przedmiotów:';
            if(isset($_COOKIE['cookie']))
            {
                foreach($_COOKIE['cookie'] as $name => $value)
                {
                    $book = $this->Kategorie_model->get_books_by_ID($name);
                    $b = $book->row();
                    $data['email'] .= $b->BOOK_Title. 'x'.$value.',\n';
                }
                $data['email'] .= 'na łączną kwotę: '.$suma;
                $mail = $data['email'];
                $this->email->message($mail);

                if($this->email->send())
                return 'success';
                else
                    return 'error';
            }
            else
                return 'nic nie kupiles';

      }

and this is my email.php configuration
Code:
var    $useragent        = "CodeIgniter";
    var    $mailpath        = "/usr/sbin/sendmail";    // Sendmail path
    var    $protocol        = "mail";    // mail/sendmail/smtp
    var    $smtp_host        = "";        // SMTP Server.  Example: mail.earthlink.net
    var    $smtp_user        = "";        // SMTP Username
    var    $smtp_pass        = "";        // SMTP Password
    var    $smtp_port        = "25";        // SMTP Port
    var    $smtp_timeout    = 5;        // SMTP Timeout in seconds
    var    $wordwrap        = TRUE;        // TRUE/FALSE  Turns word-wrap on/off
    var    $wrapchars        = "76";        // Number of characters to wrap at.
    var    $mailtype        = "text";    // text/html  Defines email formatting
    var    $charset        = "utf-8";    // Default char set: iso-8859-1 or us-ascii
    var    $multipart        = "mixed";    // "mixed" (in the body) or "related" (separate)
    var $alt_message    = '';        // Alternative message for HTML emails
    var    $validate        = FALSE;    // TRUE/FALSE.  Enables email validation
    var    $priority        = "3";        // Default priority (1 - 5)
    var    $newline        = "\n";        // Default newline. "\r\n" or "\n" (Use "\r\n" to comply with RFC 822)
    var $crlf            = "\n";        // The RFC 2045 compliant CRLF for quoted-printable is "\r\n".  Apparently some servers,
                                    // even on the receiving end think they need to muck with CRLFs, so using "\n", while
                                    // distasteful, is the only thing that seems to work for all environments.
    var $send_multipart    = TRUE;        // TRUE/FALSE - Yahoo does not like multipart alternative, so this is an override.  Set to FALSE for Yahoo.
    var    $bcc_batch_mode    = FALSE;    // TRUE/FALSE  Turns on/off Bcc batch feature
    var    $bcc_batch_size    = 200;        // If bcc_batch_mode = TRUE, sets max number of Bccs in each batch
    var $_safe_mode        = FALSE;
    var    $_subject        = "";
    var    $_body            = "";
    var    $_finalbody        = "";
    var    $_alt_boundary    = "";
    var    $_atc_boundary    = "";
    var    $_header_str    = "";
    var    $_smtp_connect    = "";
    var    $_encoding        = "8bit";
    var $_IP            = FALSE;
    var    $_smtp_auth        = FALSE;
    var $_replyto_flag    = FALSE;
    var    $_debug_msg        = array();
    var    $_recipients    = array();
    var    $_cc_array        = array();
    var    $_bcc_array        = array();
    var    $_headers        = array();
    var    $_attach_name    = array();
    var    $_attach_type    = array();
    var    $_attach_disp    = array();
    var    $_protocols        = array('mail', 'sendmail', 'smtp');
    var    $_base_charsets    = array('us-ascii', 'iso-2022-');    // 7-bit charsets (excluding language suffix)
    var    $_bit_depths    = array('7bit', '8bit');
    var    $_priorities    = array('1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)');
#12

[eluser]Ninjabear[/eluser]
Post quite old now. Did you ever get this error sorted penta997? If so I'd love to know what the fix is, thanks.
#13

[eluser]rikes_denis[/eluser]
i got email problem too,
this is my code:
Code:
$this->email->to($this->employermodel->get_email($id));
$uname =$this->employermodel->get_uname($id);
$this->email->subject('Petra Career Center Registration Confirm');
$this->email->message('username : '. $uname .'<br>'.'password : '.$password);
$this->email->send();

and my model

Code:
function get_email($id)
    {
        $this->db->where('id', $id);    
        return $this->db->get($this->tbl, 'comp_email');
    }
    function get_uname($id)
    {
        $this->db->where('id', $id);    
        return $this->db->get($this->tbl, 'brand_name');
    }

is there something wrong with my code?
please help
thanx
#14

[eluser]InsiteFX[/eluser]
To use the Email Class you have to setup the $config array to the correct parameters!
Code:
$config['param'] = 'value';

InsiteFX
#15

[eluser]Ninjabear[/eluser]
[quote author="InsiteFX" date="1303609092"]To use the Email Class you have to setup the $config array to the correct parameters!
Code:
$config['param'] = 'value';

InsiteFX[/quote]

Come on InsiteFX, this email class is way too hard! Only reason I'm asking personally is because I want to add it to my site as a CI problem / fix.
#16

[eluser]InsiteFX[/eluser]
Twisted1919 showed you above how to set the config array and I have posted a whole topic on this in the forums. So do a search!

Were not going to write all the code for you!

InsiteFx
#17

[eluser]Ninjabear[/eluser]
[quote author="InsiteFX" date="1303695563"]Twisted1919 showed you above how to set the config array and I have posted a whole topic on this in the forums. So do a search!

Were not going to write all the code for you!

InsiteFx[/quote]

I hope you understood I was joking.
#18

[eluser]InsiteFX[/eluser]
LOL, you should have mentioned that you were joking...

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB