[wordpress插件] SES for WordPressWordPress的SES

wordpress 插件 文章 2020-02-27 09:50 561 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

SES for WordPress

适用于WordPress的SES

Introduction

简介

This plugin provides support for AWS’s Simple Email Service for your WP site.

此插件为您的WP网站提供对AWS的简单电子邮件服务的支持。

It supports arbitrary custom headers and handles image embedding for you.

它支持任意的自定义标头并为您处理图像嵌入。

It sends HTML messages with an automatically-generated plain-text counterpart.

它发送带有自动生成的纯文本副本的HTML消息。

By default, it overrides the native wp_mail function, so all you need to do is configure your AWS Keys and sender in Settings > SES4WP Options.

默认情况下,它会覆盖本机wp_mail函数,因此您所需要做的就是在“设置”>“ SES4WP选项”中配置您的AWS密钥和发件人。

Components

组件

    1. PEAR Mime_mail to create the message
    2. PEAR Mime_mail创建消息

    3. Jevon Wright's html2text for the plain-text part

    4. Jevon Wright的 html2text 用于纯文本部分

      >

      >

    5. AWS SDK v1.5
    6. AWS SDK v1.5

    Embedding images

    嵌入图像

    Before your call to wp_mail(), call ses4wp_embed_image with an image handle and the path to your image.

    在调用wp_mail()之前,请先调用带有图像句柄和图像路径的 ses4wp_embed_image

    It will return a content_id for you to use in your src attribute.

    它将返回一个content_id供您在src属性中使用。

    Paths should be given relative to your webserver root.

    应该相对于您的Web服务器根目录指定路径。

    So for instance, to embed wp-content/themes/twentyeleven/images/wordpress.png, you would omit the slash at the beginning.

    因此,例如,要嵌入 wp-content / themes / twentyeleven / images / wordpress.png ,您可以在开始时省略

    eg

    例如

    $content_id = ses4wp_embed_image( 'my_image', 'wp-content/path/to/image.jpg' );

      $ content_id = ses4wp_embed_image('my_image','wp-content / path / to / image.jpg');

    $mail_body = "This is an image. ";

    $ mail_body =“这是一张图片。”;

    wp_mail( 'bob@example.com', 'My Subject', $mail_body );

    wp_mail('bob@example.com','我的主题',$ mail_body);

    The image will be attached to the email and delivered inline.

    图片将附加到电子邮件中并以内嵌方式发送。

安装步骤

    1. Upload plugin-name.php to the /wp-content/plugins/ directory and activate it
    2. plugin-name.php 上载到 / wp-content / plugins / 目录并激活它

    3. Configure your AWS keys in Settings > SES4WP Options
    4. 在“设置”>“ SES4WP选项”中配置您的AWS密钥

下载地址
https://downloads.wordpress.org/plugin/aws-ses-for-wp.zip
-EOF-

AI助手支持GPT4.0