All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lmaye.cloud.starter.email.entity.Email Maven / Gradle / Ivy

There is a newer version: 1.2.29
Show newest version
package com.lmaye.cloud.starter.email.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;

/**
 * -- Email
 *
 * @author Lmay Zhou
 * @date 2021/4/14 16:52
 * @email [email protected]
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Email implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 邮件发送者
     * - 未指定: 随机或默认邮箱账号
     */
    private String mailSender;

    /**
     * 发件人名称
     * - 未指定: 默认邮箱账号名称
     */
    private String senderName;

    /**
     * 邮件接收人
     */
    private String[] recipient;

    /**
     * 抄送
     */
    private String[] cc;

    /**
     * 密送
     */
    private String[] bcc;

    /**
     * 邮件主题
     */
    private String subject;

    /**
     * 发送邮件格式为 HTML
     */
    private Boolean html = false;

    /**
     * 邮件内容(text/html)
     * 
     *     HTML模版填充示例:
     *
     *     import freemarker.template.Configuration;
     *     ...
     *     FreeMarkerTemplateUtils.processTemplateIntoString(configuration.getTemplate("ResetPassword.ftl"), GsonUtils.fromJson(data, Map.class))
     * 
*/ private String content; /** * 附件 */ private MultipartFile[] files; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy