我想發送郵件給用戶,郵件正在發送,但其中的鏈接現在顯示爲鏈接,我還希望在郵件中嵌入徽標但徽標沒有顯示,下面是我的代碼。我使用的蛋糕2.8我想在cakephp中的電子郵件中插入一個鏈接
$Email = new CakeEmail();
$Email->from(array('[email protected]'=>'West Africal College of Surgeons'));
$Email->to($email);
$Email->subject('Reviewer Invitation From West African College of Surgeons');
$Email->send('Dear Reviewer, You have been invited by the Head of Faculty of $faculty from the West'
. 'African College of Surgeons to register as a reviewer. Please click on the link '
. 'below to register'
. 'http://wacscoac.org/edms/users/addreviewer');
$Email->attachments('img/logo.png');
創建模板@ AIPD TECH,謝謝你,但是這是我得到錯誤的錯誤:在調用一個成員函數的圖像()非對象 –
謝謝,但如果logo.png位於webroot文件夾中呢? –
只需從路徑中刪除'img'。我會建議使用模板發送電子郵件。 '$的電子郵件 - > emailFormat( 'HTML');' –