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

org.smart4j.plugin.mail.send.impl.TextMailSender Maven / Gradle / Ivy

The newest version!
package org.smart4j.plugin.mail.send.impl;

import java.net.MalformedURLException;
import org.apache.commons.mail.Email;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.MultiPartEmail;
import org.smart4j.plugin.mail.send.AbstractMailSender;

public class TextMailSender extends AbstractMailSender {

    public TextMailSender(String subject, String content, String[] to) {
        super(subject, content, to);
    }

    @Override
    protected Email createEmail() {
        return new MultiPartEmail();
    }

    @Override
    protected void setContent(Email email, String content) throws MalformedURLException, EmailException {
        email.setMsg(content);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy