如何解决无法使用 AMAZON SES SMTP 和 tinymce 编辑器在 Gmail 中发送徽标
我使用 Amazon SES SMTP 发送电子邮件。一切都很好。电子邮件正文和徽标可以很好地发送到所有其他电子邮件地址,如 Outlook、Hotmail、雅虎和任何域帐户,如 info@abc.com。 但在 Gmail 中,会出现一个空白框而不是徽标。
这是 TinyMce 编辑器脚本
<script>
tinymce.init({
selector: 'textarea#editor',convert_urls : false,relative_urls : false,remove_script_host : false,width: "700",height: "200",plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak','searchreplace wordcount visualblocks visualchars code fullscreen','insertdatetime media nonbreaking save table contextmenu directionality','emoticons template paste textcolor colorpicker textpattern imagetools'],toolbar: ['undo redo | styleselect | bold italic | forecolor backcolor | imageupload','alignleft aligncenter alignright | bullist numlist | outdent indent | table | preview'],/* enable title field in the Image dialog*/
image_title: true,/* enable automatic uploads of images represented by blob or data URIs*/
automatic_uploads: true,/*
URL of our upload handler (for more details check: https://www.tiny.cloud/docs/configure/file-image-upload/#images_upload_url)
images_upload_url: 'postAcceptor.php',here we add custom filepicker only to Image dialog
*/
file_picker_types: 'image',/* and here's our custom image picker*/
file_picker_callback: function (cb,value,meta) {
var input = document.createElement('input');
input.setAttribute('type','file');
input.setAttribute('accept','image/*');
/*
Note: In modern browsers input[type="file"] is functional without
even adding it to the DOM,but that might not be the case in some older
or quirky browsers like IE,so you might want to add it to the DOM
just in case,and visually hide it. And do not forget do remove it
once you do not need it anymore.
*/
input.onchange = function () {
var file = this.files[0];
var reader = new FileReader();
reader.onload = function () {
/*
Note: Now we need to register the blob in TinyMCEs image blob
registry. In the next release this part hopefully won't be
necessary,as we are looking to handle it internally.
*/
var id = 'blobid' + (new Date()).getTime();
var blobCache = tinymce.activeEditor.editorUpload.blobCache;
var base64 = reader.result.split(',')[1];
var blobInfo = blobCache.create(id,file,base64);
blobCache.add(blobInfo);
/* call the callback and populate the Title field with the file name */
cb(blobInfo.blobUri(),{ title: file.name });
};
reader.readAsDataURL(file);
};
input.click();
},content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
</script>
这是从 TinyMce 生成的代码
<p><img title="site_logo-1616442099.png" src="blob:https://intellectsofts.com/3523c17f-0453-4785-b3dd-c5c9e1d52992" alt="" width="298" height="92" /></p>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。