cakephp 2.3을 사용하고 있습니다. 2MB 또는 evern 3MB의 파일 크기로 정상적으로 작동하는 다음 코드를 사용하여 전자 메일을 보내고 있습니다. 그러나 크기가 7MB 인 파일이있을 때 내부 오류가 발생하고 특정 오류가 표시되지 않습니다. cakephp 이메일 첨부 파일 크기
나는 메모리 크기가 증가함에 따라이를 해결하기 위해 시도를하지만하지 않았다 어느 날 그것을 해결하기 위해이에 대한 도울 수 작동합니다.$file_name= APP."webroot/$file_name";
$email = new CakeEmail();
$email->from(array('[email protected]' => 'Example'));
$email->to($email_);//$email
$email->subject('an example - '.$form_name);
$email->emailFormat('html');
$body="Body of email";
$email->attachments(array(
"$form_name.pdf" => array(
'file' => $file_name,
'mimetype' => 'application/pdf',
'contentId' => 'an-id'
)
));
$email->send($body);
try flush(); – harikrish
아마도 메모리 한도가 너무 낮습니까? 현재 한도는 얼마입니까? – mark
자사의 클라우드 서버와 나는 ini_set ('memory_limit', '500M')으로 메모리 제한을 500MB로 설정했다. – nbhatti2001