主题: 我用kindEditor3.5版本发送邮件,发送出去的图片不能显示,怎么修改代码在发出去的图片能在别 |
作者: 追风少年, 发布日期: 2010-07-10 10:05:04, 浏览数: 6307 |
我用kindEditor3.5版本发送邮件,发送出去的图片不能显示,怎么修改代码在发出去的图片能在别人的邮件里显示出来, 我要在kindEditor那里修改代码才能实现发出去的图片显示,希望版主空回复一下。 |
作者: Roddy, 发布日期: 2010-07-10 10:47:29 |
KE.show({ id : 'textarea_id', urlType : 'domain' }); |
回复 |
作者: sheep, 发布日期: 2010-10-27 18:46:18 |
我也试了还是不行 代码如下 Sendmail.html <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>在线客服系统</title>
<style> textarea { display: block; } </style> <script charset="utf-8" src="../../../kindeditor_tw/kindeditor.js"></script> <script>
KE.show({ id : 'sendbody', urlType : 'domain' }); </script> <style> input{width:250px; border:solid 1px #ccc;} textarea{width:600px; height:300px; border:solid 1px #ccc;} table{font-size:12px; color:#666; border:solid 1px #C1C1C1;} table tr td{padding:7px;} .btn{background:#fff; width:auto;} </style> <script> function checkform(){ var name=document.getElementById("sndname").value; var mail=document.getElementById("sendmail").value; var subject=document.getElementById("subject").value; var mailbody=document.getElementById("sendbody").value;
if(name !="" && mail!="" && subject!="" && mailbody!=""){ document.form1.submit(); }else{ alert("请确认下列字段是否都已填写:\n1.姓名\n2.Email\n3.响应类别\n4.响应内容"); } } </script> <script type="text/javascript"> function runCode(obj) { var winname = window.open('', "_blank", ''); winname.document.open('text/html', 'replace'); //winname.opener = null // 防止代码对原页面修改 winname.document.write(obj.value); //写入code winname.document.close(); } function saveCode(obj) { var winname = window.open('', '_blank', 'top=10000'); winname.document.open('text/html', 'replace'); winname.document.writeln(obj.value); winname.document.execCommand('saveas','','code.htm'); winname.close(); } function copyCode(obj) { var rng = document.body.createTextRange(); rng.moveToElementText(obj); rng.scrollIntoView(); rng.select(); rng.execCommand("Copy"); rng.collapse(false); } </script> </head>
<body> <form id="form1" name="form1" method="post" action="sendmail.php"><br /> <h2 style="width:600px; margin:0 auto; color:#333333;">在线客服系统</h2> <table width="600" height="211" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="71" align="center" bgcolor="#e7e7e7">姓名</td> <td width="314" bgcolor="#e7e7e7"><label> <input type="text" name="sndname" id="sndname" /> </label></td> </tr> <tr> <td align="center">Email</td> <td><input type="text" name="sendmail" id="sendmail" /></td> </tr> <tr> <td align="center" bgcolor="#E7E7E7">响应类别</td> <td bgcolor="#E7E7E7"> <select name="subject" id="subject"> <option value="站务问题" selected="selected">站务问题</option> <option value="合作提案">合作提案</option> <option value="其它问题">其它问题</option> </select> </td> </tr> <tr> <td height="64" align="center">响应内容</td> <td><textarea name="sendbody" id="sendbody"></textarea></td>
</tr> <tr> <td colspan="2" align="center" bgcolor="#FFFFFF"><label> <input type="button" name="button" id="button" value="送 出" class="btn" onclick="checkform();"/> <input type="reset" name="button2" id="button2" value="取 消" class="btn"/> <input type="button" value="运行代码" class="btn" onclick="runCode(sendbody)"> <input type="button" value="复制代码" class="btn" onclick="copyCode(sendbody)"> <input type="button" value="另存代码" class="btn" onclick="saveCode(sendbody)"> </label></td> </tr> </table> <td align="left" valign="middle"><input id="yes_name" name="table_name" type="hidden" class="leaveword_input" value="姓名 :"/></td> <td align="left" valign="middle"><input id="yes_name" name="table_mail" type="hidden" class="leaveword_input" value="信箱:"/></td> <td align="left" valign="middle"><input id="yes_name" name="table_main" type="hidden" class="leaveword_input" value="主题:"/></td> <td align="left" valign="middle"><input id="yes_name" name="table_content" type="hidden" class="leaveword_input" value="响应内容:"/></td> </form> </body> </html>
Sendmail.php <?php include("./phpmailer/class.phpmailer.php"); //汇入PHPMailer类别 function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; }
$Name=$_POST['sndname']; $Mail=$_POST['sendmail']; $Subject=$_POST['subject']; $Sendbody=$_POST['sendbody'];
$table_name=$_POST['table_name']; $table_Mail=$_POST['table_Mail']; $table_main=$_POST['table_main']; $table_content=$_POST['table_content']; $table_content = stripslashes_deep($table_content);
//$table_content=preg_replace('/\\\\/','', addslashes($_POST['table_content'])); //$sdate = date("Y-m-d H:i", time());
$mail= new PHPMailer(); //建立新对象 $mail->IsSMTP(); //设定使用SMTP发送 $mail->Host = "mail.com"; //指定SMTP的服务器地址 $mail->Port = 25; //设定SMTP服务的POST $mail->SMTPAuth = false; //设定为安全验证方式 (true,false) $mail->Username = "user@mail.com"; //SMTP的账号 $mail->Password = "123456"; //SMTP的密码
$mail->From = " user@mail.com "; //寄件人Email $mail->FromName = iconv("Big5","UTF-8","YesMall客服系统"); //寄件人名称
$mail->CharSet="utf-8"; //设定信件字符编码 $mail->Encoding = "base64"; //设定信件编码,大部分邮件工具都支持此编码方式
$mail->Subject =iconv("Big5","UTF-8","一封在线客服信"); //邮件标题 //$mail->Body = "姓名:".$Name."<br>信箱:".$Mail."<br>主题:".$Subject."<br>响应内容:".$Sendbody; //邮件内容 $mail->Body = "
{$_POST['table_name']} {$_POST['sndname']} <br> {$_POST['table_mail']} {$_POST['sendmail']} <br> {$_POST['table_main']} {$_POST['subject']} <br> {$_POST['table_content']} {$_POST['sendbody']} <br> ";
$mail->IsHTML(true); //邮件内容为html ( true || false) $mail->AddAddress("boss@mail.com "); //收件者邮件及名称
if(!$mail->Send()) { echo "发送错误: " . $mail->ErrorInfo; } else { echo "<div align=center>感谢您的回复,我们将会尽速处理!</div>"; } ?> 请版主或高手帮忙解解 |
回复 |