0

我需要帮助才能通过 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\\;
4

1 回答 1

1

Google 使用代理来显示图像。由于您的本地主机不可公开访问,因此 Google 无法找到您在邮件中发送的图像。

查看Gmail 中标签的src属性。img是这样的:https://ci4.googleusercontent.com/proxy/HMqMF9fRFZZi(...)而不是本地主机 URL。

但是,您可以使用诸如 ngrok 之类的隧道服务使您的 localhost 可公开访问:https ://ngrok.com/usage

于 2014-04-30T14:38:02.853 回答