Welcome Guest, Not a member yet? Register   Sign In
I have created the onfly pdf but its not sending mail to desired email address
#1

[eluser]Unknown[/eluser]
Hi I am new at CI I have faced a problem after generating a on fly pdf and send it to my user. It creates on fly pdf but does not attach at email. this this is my model function where i called the pdf class
Code:
function counter_offer_submit(){
                $lId =$_SESSION['lId'];
                $contract_letter=$this->pdf();
                $filename   = md5(time() * rand(100, 1000)) .'.pdf';
                
                 //$contract_letter;
                  $data_part1 = array(

                                              'contract_build'=>'1',
                                             //'contract_letter'=>$contract_letter
                                            );
                                            $where="id=$lId";
                                             $query=$this->db->update_string('loan',$data_part1,$where);
                                             $this->db->query($query);
                     $query = $this->db->query("select borrower_id,lender_id from digi_loan where id=$lId");
                     foreach($query->result() as $field){
                                             $borrower_id=$field->borrower_id;
                                              $lender_id=$field->lender_id;
                                     }
                                    
                     $query2 = $this->db->query("select email from digi_users where id=$borrower_id or id=$lender_id ");
                    
                     foreach($query2->result() as $field){
                                             $des=$field->email.',';
                                     }            
                    
                     $this->email->from('[email protected]', 'Lenders Utopia');
                    $this->email->to($des);
                    $this->email->cc('[email protected]');
                    $this->email->bcc('[email protected]');

                    $this->email->subject('Contract Confirmation Letter for Loan Applied');
                    $this->email->message($filenam);    

                    $this->email->send();

                    echo $this->email->print_debugger();exit;
             }

and the pdf function is
Code:
function pdf()
            {    
                
                
                $this->load->library('cezpdf');
                $this->load->helper('pdf');
                $this->cezpdf->ezText('LOAN AGREEMENT AND PROMISSORY NOTE OF '.$offers_loan_name, 12, array('justification' => 'center'));
                $this->cezpdf->ezSetDy(-10);
        
                $content = 'THIS LOAN AGREEMENT AND PROMISSORY NOTE OF Example PDF
        
        ';

    $this->cezpdf->ezText($content, 10);
        
                
                
                prep_pdf(); // creates the footer for the document we are creating.
$this->cezpdf->ezStream();

Please Help me!!


Messages In This Thread
I have created the onfly pdf but its not sending mail to desired email address - by El Forum - 01-20-2010, 06:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB