Package com.googlecode.gmail4j

Examples of com.googlecode.gmail4j.GmailException


    @Override
    public String getPreview() {
        try {
            return source.getContent().toString();
        } catch (final Exception e) {
            throw new GmailException("Failed getting message preview", e);
        }
    }
View Full Code Here


    @Override
    public int getMessageNumber() {
        try {
            return source.getMessageNumber();
        } catch (final Exception e) {
            throw new GmailException("Failed getting message number", e);
        }
    }
View Full Code Here

                        }
                    }
                }
            }
        } catch (final Exception e) {
            throw new GmailException("Failed getting message header information", e);
        }
        return headerInfo;
    }
View Full Code Here

            }
          }
        }
        return result.toString();
      } catch (Exception e) {
        throw new GmailException("Failed getting text content from " +
            "JavaMailGmailMessage. You could try handling " +
            "((JavaMailGmailMessage).getMessage()) manually", e);
      }
    }
View Full Code Here

            } else {
                source.addRecipient(RecipientType.TO,
                        new InternetAddress(to.getEmail()));
            }
        } catch (final Exception e) {
            throw new GmailException("Failed adding To recipient", e);
        }
    }
View Full Code Here

    @Override
    public List<EmailAddress> getTo() {
        try {
            return getAddresses(RecipientType.TO);
        } catch (final Exception e) {
            throw new GmailException("Failed getting List of To recipients", e);
        }
    }
View Full Code Here

    @Override
    public List<EmailAddress> getCc() {
        try {
            return getAddresses(RecipientType.CC);
        } catch (final Exception e) {
            throw new GmailException("Failed getting List of Cc recipients", e);
        }
    }
View Full Code Here

                        from.getEmail(), from.getName()));
            } else {
                source.setFrom(new InternetAddress(from.getEmail()));
            }
        } catch (final Exception e) {
            throw new GmailException("Failed setting from address", e);
        }
    }
View Full Code Here

        if (from == null) {
            try {
                final InternetAddress f = (InternetAddress) source.getFrom()[0];
                from = new EmailAddress(f.getPersonal(), f.getAddress());
            } catch (final Exception e) {
                throw new GmailException("Failed getting from address", e);
            }
        }
        return from;
    }
View Full Code Here

    @Override
    public Date getSendDate() {
        try {
            return source.getSentDate();
        } catch (final Exception e) {
            throw new GmailException("Failed getting send date", e);
        }
    }
View Full Code Here

TOP

Related Classes of com.googlecode.gmail4j.GmailException

Copyright © 2018 www.massapicom. 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.