commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/SimpleEmail.java [27:48]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class SimpleEmail extends Email {

    /**
     * Constructs a new instance.
     */
    public SimpleEmail() {
        // empty
    }

    /**
     * Sets the content of the mail.
     *
     * @param msg A String.
     * @return An Email.
     * @throws EmailException see jakarta.mail.internet.MimeBodyPart for definitions
     * @since 1.0
     */
    @Override
    public Email setMsg(final String msg) throws EmailException {
        EmailException.checkNonEmpty(msg, () -> "Invalid message.");
        setContent(msg, EmailConstants.TEXT_PLAIN);
        return this;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/SimpleEmail.java [27:48]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class SimpleEmail extends Email {

    /**
     * Constructs a new instance.
     */
    public SimpleEmail() {
        // empty
    }

    /**
     * Sets the content of the mail.
     *
     * @param msg A String.
     * @return An Email.
     * @throws EmailException see javax.mail.internet.MimeBodyPart for definitions
     * @since 1.0
     */
    @Override
    public Email setMsg(final String msg) throws EmailException {
        EmailException.checkNonEmpty(msg, () -> "Invalid message.");
        setContent(msg, EmailConstants.TEXT_PLAIN);
        return this;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



