电子邮件附件在hotmail或yahoo codeigniter

时间:2017-03-16 15:25:30

标签: php codeigniter email-attachments

我有这段代码:

                    $this->load->library('email');
                    $this->email->clear(TRUE);
                    $this->email->set_newline("\r\n");
                    $this->email->from($edata[0]->eEmail, TITLEWEB);
                    $this->email->to($vendor[0]->cEmail); 

                    $replace = array("[RECEIVER]","[SENDER]","[REQUESTTITLE]","[REFERENCE]","[POREF]");
                    $replacewith = array($vendor[0]->displayName, FNAME." ".LNAME, $purchase[0]->pTitle, $quote[0]->qReference,strtoupper($prorder));
                    $str = str_replace($replace,$replacewith,$edata[0]->eContent);
                    $message = $str;
                    $subjet = str_replace("[SENDER]",FNAME." ".LNAME,$edata[0]->eSubject);
                    $this->email->subject($subjet);
                    $this->email->message($message);

                    $this->email->set_mailtype("html");
                    $this->email->attach('resources/uploads/pdfs/'.strtoupper($prorder).".pdf");
                    $send = $this->email->send();

电子邮件正常发送但附件未显示正常或在hotmail或yaho中显示已损坏。 附件原始尺寸为:16K 但它在电子邮件中的显示仅为332Byte

你能否告诉我这个问题是什么......从最近2天开始就坚持了这个问题........

enter image description here

1 个答案:

答案 0 :(得分:0)

尝试使用 $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1; $pagenum = intval($pagenum); $page_links = paginate_links( array( 'base' => add_query_arg( 'pagenum', '%#%' ), 'format' => '', 'prev_text' => __( '&laquo; Previous', 'text-domain' ), 'next_text' => __( 'Next &raquo;', 'text-domain' ), 'total' => 1, 'current' => $pagenum ) ); if ( $page_links ) { echo '<ul class="pagination"><li class="page-item" style="margin: 1em 0">' . $page_links . '</li></ul>'; } 使用TRUE清除附件。