我需要帮助才能通过 ckeditor 发送电子邮件并且还面临以下问题?
1) 问题是echo $message =$editor1;
当我在 ckedit 中插入图像时我看不到图像以及如何在电子邮件中看到图像?
ckeditor在文件夹上上传图像UserFilesAbsolutePath
2) 我如何在textarea name='email'
??中发送多封收据电子邮件?
例如带有逗号的多个收据电子邮件
demo@yahoo.com,test@yahoo.com,123@gmail.com & 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 = 'test@yahoo.com'; //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>
这是我的 Ckeditor Filemanager 的 UserFilesPath
$Config['UserFilesPath'] =
'http://localhost/test/phpmultipleemails/uploads/';
这里我的 UserFilesAbsolutePath 用于 Ckeditor 文件管理器
$Config['UserFilesAbsolutePath'] =
'D:\\xampp\\htdocs\\test\\phpmultipleemails\\uploads\\;