我需要幫助才能通過ckeditor發送電子郵件並且還面臨以下問題?我在ckeditor中插入圖片並從fckeditor上傳時無法在電子郵件中看到圖像
1)問題是我無法看到圖像當我echo $message =$editor1;
和我如何看到圖像在電子郵件中時,我插入圖像在ckedit?這是如何發送的textarea name='email'
多次收到郵件的文件夾UserFilesAbsolutePath
2)
的CKEditor上傳圖片?
例如多次收到電子郵件用逗號
[email protected],[email protected],[email protected] & Sending TO All Select
//same like gmail,yahoo & hotmail
進程頁
這裏我傳送電子郵件頁面
if(isset($_POST['sendemail'])){
$email=$_POST['email'];
$email=$_POST['email'];
$subject=$_POST['subject'];
$editor1=$_POST['editor1'];
$your_email = '[email protected]'; //CHANGE TO YOUR SETTINGS
$domain = $_SERVER["HTTP_HOST"]; //YOUR DOMAIN AND EXTENSION
$to = $email;
$subject = $subject;
echo $message =$editor1;
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: Testing Email<$your_email>\r\n" .
"X-Mailer: PHP/" . phpversion();
mail($to, $subject, $message, $headers);
//if(!empty($message)){
//header('Location:index.php');
//}
}
索引頁
<form action="process.php" method="post">
To:
<textarea class="input_field" name="email" id="email"></textarea>
Subject:
<input type="text" name="subject" id="subject" />
Message:
<textarea class="ckeditor" name="editor1" id="editor1" ></textarea>
<script type="text/javascript">
var editor = CKEDITOR.replace('editor1', {
tabSpaces:10,
filebrowserBrowseUrl :'ckeditor/filemanager/browser/default/browser.html?Connector=http://localhost/test/phpmultipleemails/ckeditor/filemanager/connectors/php/connector.php',
filebrowserImageBrowseUrl : 'ckeditor/filemanager/browser/default/browser.html?Type=Image&Connector=http://localhost/test/phpmultipleemails/ckeditor/filemanager/connectors/php/connector.php',
filebrowserFlashBrowseUrl :'ckeditor/filemanager/browser/default/browser.html?Type=Flash&Connector=http://localhost/test/phpmultipleemails/ckeditor/filemanager/connectors/php/connector.php',
filebrowserUploadUrl :'http://localhost/test/phpmultipleemails/ckeditor/filemanager/connectors/php/upload.php?Type=File',
filebrowserImageUploadUrl : 'http://localhost/test/phpmultipleemails/ckeditor/filemanager/connectors/php/upload.php?Type=Image',
filebrowserFlashUploadUrl : 'http://localhost/test/phpmultipleemails/ckeditor/filemanager/connectors/php/upload.php?Type=Flash',
filebrowserWindowWidth : '730',
filebrowserWindowHeight : '500'
});
CKEDITOR.instances["post-content"].on("instanceReady", InstanceReadyEvent);
function InstanceReadyEvent() {
this.document.on("keyup", function() {
$('#editform').trigger('change');
});
}
</script>
這裏我UserFilesPath對於CKEDITOR文件管理器
$Config['UserFilesPath'] =
'http://localhost/test/phpmultipleemails/uploads/';
這裏我UserFilesAbsolutePath對於CKEDITOR文件管理器
$Config['UserFilesAbsolutePath'] =
'D:\\xampp\\htdocs\\test\\phpmultipleemails\\uploads\\;
如果您發送電子郵件的外部,即:到Gmail或東西就無法打開的圖像保存在您的localhost,因此您必須將圖像上傳到可公開訪問的Web服務器,然後纔會顯示在您的電子郵件中。 – Dave 2013-05-03 14:43:58
@dave我已經從'ckeditor fckeditor文件管理器'的文件夾中存儲了圖像,還有圖像顯示在文件夾中? – 2013-05-03 14:45:22
但ck編輯器將圖片鏈接放在'
'處,然後您將轉到gmail或yahoo或wheverever,無法訪問您的本地主機,因此無法顯示電子郵件。如果你查看電子郵件源,你會明白我的意思。如果您將電子郵件下載到本地郵件客戶端,則圖片顯示正常。 http:// localhost不是公共可用的,甚至是有效的域名。你的路徑需要是網站的URL,當它在你的服務器上,但你需要在工作之前將圖像上傳到實時服務器 –
Dave
2013-05-03 14:51:09