Search in sources :

Example 56 with Recipient

use of org.simplejavamail.api.email.Recipient in project nzyme by lennartkoopmann.

the class EmailCallbackTest method testParseRecipient.

@Test
public void testParseRecipient() throws Exception {
    Recipient recipient = Tools.parseEmailAddress("Lennart Koopmann <lennart@0x58ed.com>");
    assertEquals(recipient.getName(), "Lennart Koopmann");
    assertEquals(recipient.getAddress(), "lennart@0x58ed.com");
    assertEquals(recipient.getType(), Message.RecipientType.TO);
}
Also used : Recipient(org.simplejavamail.api.email.Recipient) Test(org.testng.annotations.Test)

Aggregations

Recipient (org.simplejavamail.api.email.Recipient)56 Test (org.junit.Test)43 Email (org.simplejavamail.api.email.Email)31 File (java.io.File)10 AttachmentResource (org.simplejavamail.api.email.AttachmentResource)7 InternetAddress (jakarta.mail.internet.InternetAddress)4 NotNull (org.jetbrains.annotations.NotNull)4 EmailPopulatingBuilder (org.simplejavamail.api.email.EmailPopulatingBuilder)4 EmailConverter.mimeMessageToEmail (org.simplejavamail.converter.EmailConverter.mimeMessageToEmail)4 Address (jakarta.mail.Address)2 MimeMessage (jakarta.mail.internet.MimeMessage)2 InputStream (java.io.InputStream)2 Collection (java.util.Collection)2 Map (java.util.Map)2 HashedMap (org.apache.commons.collections4.map.HashedMap)2 Property (org.simplejavamail.config.ConfigLoader.Property)2 InternalEmailPopulatingBuilder (org.simplejavamail.email.internal.InternalEmailPopulatingBuilder)2 Test (org.testng.annotations.Test)2 EmailHelper (testutil.EmailHelper)2 MimeMessageAndEnvelope (testutil.testrules.MimeMessageAndEnvelope)2