1
我有這樣的代碼:電子郵件附件
$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();
電子郵件被正確地來,但附件不proprly顯示或Hotmail或YAHO顯示損壞.. 附件原來的尺寸是: 16K 但其在電子郵件只顯示332Byte
能否請你告訴我有什麼問題..中號停留在此的最後2天........
請請別人提供解決方案.......... :( – DeDevelopers
)您可以在'$ this-> email-> send後添加'$ email_respone = $ this-> email-> print_debugger();'' ();'然後''var_dump'' $ email_response'來查看可能發生的消息 –
可能找不到您的附件文件 –