Examples of EmailAddress


Examples of com.brienwheeler.lib.email.EmailAddress

    if (!EmailAddress.isValid(value))
      return true; // invalid email addresses don't exist in the system
   
    IUserEmailAddressService userEmailAddressService = applicationContext.getBean(constraintAnnotation.userEmailAddressService(),
        IUserEmailAddressService.class);
    return userEmailAddressService.findByEmailAddress(new EmailAddress(value)) == null;
  }
View Full Code Here

Examples of com.cedarsolutions.shared.domain.email.EmailAddress

        result = new GaeEmailUtils().createInternetAddress("someone@example.com", "Someone Important");
        assertNotNull(result);
        assertEquals("someone@example.com", result.getAddress());
        assertEquals("Someone Important", result.getPersonal());

        result = new GaeEmailUtils().createInternetAddress(new EmailAddress("Someone Important", "someone@example.com"));
        assertNotNull(result);
        assertEquals("someone@example.com", result.getAddress());
        assertEquals("Someone Important", result.getPersonal());
    }
View Full Code Here

Examples of com.cedarsolutions.shared.domain.email.EmailAddress

        String subject = "Subject";
        String plaintext = "Plaintext";

        EmailMessage email = new EmailMessage();
        email.setFormat(EmailFormat.PLAINTEXT);
        email.setSender(new EmailAddress("Example Sender", "sender@example.com"));
        email.setRecipients(new EmailAddress("Example Recipient", "recipient@example.com"));
        email.setReplyTo(new EmailAddress("Example Reply", "reply@example.com"));
        email.setSubject(subject);
        email.setPlaintext(plaintext);

        InternetAddress sender = new GaeEmailUtils().createInternetAddress("sender@example.com", "Example Sender");
        InternetAddress recipient = new GaeEmailUtils().createInternetAddress("recipient@example.com", "Example Recipient");
View Full Code Here

Examples of com.cedarsolutions.shared.domain.email.EmailAddress

        String plaintext = "Plaintext";
        String html = "<p>Hello, world.</p>";

        EmailMessage email = new EmailMessage();
        email.setFormat(EmailFormat.MULTIPART);
        email.setSender(new EmailAddress("Example Sender", "sender@example.com"));
        email.setRecipients(new EmailAddress("Example Recipient", "recipient@example.com"));
        email.setReplyTo(new EmailAddress("Example Reply", "reply@example.com"));
        email.setSubject(subject);
        email.setPlaintext(plaintext);
        email.setHtml(html);

        InternetAddress sender = new GaeEmailUtils().createInternetAddress("sender@example.com", "Example Sender");
View Full Code Here

Examples of com.cedarsolutions.shared.domain.email.EmailAddress

    @Test public void testSendTemplatePlaintext() {
        Map<String, Object> context = new HashMap<String, Object>();

        EmailTemplate template = new EmailTemplate();
        template.setFormat(EmailFormat.PLAINTEXT);
        template.setSender(new EmailAddress("sender-name", "sender-address"));
        template.setReplyTo(new EmailAddress("reply-name", "reply-address"));
        template.setTemplateGroup("g");
        template.setTemplateName("n");
        template.setTemplateContext(context);

        ArgumentCaptor<EmailMessage> email = ArgumentCaptor.forClass(EmailMessage.class);
View Full Code Here

Examples of com.cedarsolutions.shared.domain.email.EmailAddress

    @Test public void testSendTemplateMultipart() {
        Map<String, Object> context = new HashMap<String, Object>();

        EmailTemplate template = new EmailTemplate();
        template.setFormat(EmailFormat.MULTIPART);
        template.setSender(new EmailAddress("sender-name", "sender-address"));
        template.setReplyTo(new EmailAddress("reply-name", "reply-address"));
        template.setTemplateGroup("g");
        template.setTemplateName("n");
        template.setTemplateContext(context);

        ArgumentCaptor<EmailMessage> email = ArgumentCaptor.forClass(EmailMessage.class);
View Full Code Here

Examples of com.ericdaugherty.mail.server.info.EmailAddress

            // Initialize a new message with the right file location
            SMTPMessage message = new SMTPMessage();
            message.setMessageLocation( messageFile );

            // Load each variable
            message.setFromAddress( new EmailAddress( reader.readLine() ) );
            message.setToAddresses( inflateAddresses( reader.readLine() ) );
            message.setTimeReceived( new Date( Long.parseLong( reader.readLine() ) ) );
            message.setScheduledDelivery( new Date( Long.parseLong( reader.readLine() ) ) );
            message.setDeliveryAttempts( Integer.parseInt( reader.readLine() ) );
View Full Code Here

Examples of com.ericdaugherty.mail.server.info.EmailAddress

     * @return Comma delimited String of the addresses.
     */
    private static String flattenAddresses( Collection addresses )
    {
        StringBuffer toAddresses = new StringBuffer();
        EmailAddress address;
        Iterator addressIterator = addresses.iterator();
        while( addressIterator.hasNext() )
        {
            address = (EmailAddress) addressIterator.next();
            toAddresses.append( address.toString() );
            toAddresses.append( "," );
        }

        // Remove the last comma.
        toAddresses.deleteCharAt( toAddresses.length() - 1 );
View Full Code Here

Examples of com.ericdaugherty.mail.server.info.EmailAddress

     */
    private static List inflateAddresses( String addresses )
    {
        StringTokenizer addressTokenizer = new StringTokenizer( addresses, "," );
        List addressList = new ArrayList();
        EmailAddress address;

        try
        {
            while( addressTokenizer.hasMoreTokens() )
            {
                address = new EmailAddress( addressTokenizer.nextToken() );
                addressList.add( address );
            }

            return addressList;
        }
View Full Code Here

Examples of com.ericdaugherty.mail.server.info.EmailAddress

        String fromAddress = parseAddress( inputString.substring( 10 ) );

        try {
            //It is legal for the MAIL FROM address to be empty.
            if( fromAddress == null || fromAddress.trim().equals( "" ) ) {
                message.setFromAddress( new EmailAddress() );
                message.setFromAddress( new EmailAddress("unknown@example.com") );
                log.debug( "MAIL FROM is empty, using unknown@example.com" );
            }
            //Although this is the normal case...
            else {
                EmailAddress address = new EmailAddress( fromAddress );
                message.setFromAddress( address );
                if( log.isDebugEnabled() ) { log.debug( "MAIL FROM: " + fromAddress ); }
            }
            write( MESSAGE_OK );
            return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.