Example usage for org.apache.commons.mail MultiPartEmail getHostName

List of usage examples for org.apache.commons.mail MultiPartEmail getHostName

Introduction

In this page you can find the example usage for org.apache.commons.mail MultiPartEmail getHostName.

Prototype

public String getHostName() 

Source Link

Document

Gets the host name of the SMTP server,

Usage

From source file:ninja.postoffice.commonsmail.CommonsMailHelperImplTest.java

@Test
public void testDoSetServerParameter() throws Exception {

    Mail mail = MailImplTestHelper.getMailImplWithDemoContent();

    MultiPartEmail multiPartEmail = commonsmailHelper.createMultiPartEmailWithContent(mail);

    commonsmailHelper.doSetServerParameter(multiPartEmail, "mail.superserver.com", 33, true, "username",
            "password", true);

    assertEquals("33", multiPartEmail.getSmtpPort());
    assertEquals("mail.superserver.com", multiPartEmail.getHostName());
    assertEquals(true, multiPartEmail.getMailSession().getDebug());

}