Tabnine Logo
MessagingException.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
javax.mail.MessagingException

Best Java code snippets using javax.mail.MessagingException.toString (Showing top 20 results out of 315)

origin: pentaho/pentaho-kettle

 result.setNrErrors( 1 );
} catch ( MessagingException mex ) {
 logError( "Problem while sending message: " + mex.toString() );
 result.setNrErrors( 1 );
origin: google/mail-importer

@Override
public String toString() {
 return exception.toString();
}
origin: se.vgregion.tyck-till/tyck-till-core-bc-composite-svc

private int reportByEmail(UserFeedback report) {
  try {
    sendReportByEmail(report, FEEDBACK_REPORT_EMAIL_SUBJECT);
    LOGGER.info("Successfully reported by email");
  } catch (MessagingException me) {
    System.out.println("Failed report by email" + me.toString());
    return -1;
  }
  return 0;
}
origin: com.haulmont.addon.imap/imap-global

  private static String causeDescription(MessagingException e) {
    String message = e.getMessage();
    return String.format("[%s]%s", e.getClass().getName(), message != null ? message : e.toString() );
  }
}
origin: IanDarwin/javasrc

  public void sendMails() {
    custList.forEach(customer -> {
      try {
        // This should be a bit more flexible :-(
        Mailer.send("mailhost", 
          customer, "http://www.darwinsys.com/", subject, messageBody);
        System.out.println(customer + " HANDOFF OK");
      } catch (MessagingException e) {
        System.out.println(customer + " failed: " + e.toString());
      }
    });
  }
}
origin: javax.mail/com.springsource.javax.mail

  /**
   * Write the object to the output stream, using the specific MIME type.
   */
  public void writeTo(Object obj, String mimeType, OutputStream os) 
      throws IOException {
  if (obj instanceof MimeMultipart) {
    try {
    ((MimeMultipart)obj).writeTo(os);
    } catch (MessagingException e) {
    throw new IOException(e.toString());
    }
  }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail

  /**
   * Write the object to the output stream, using the specific MIME type.
   */
  public void writeTo(Object obj, String mimeType, OutputStream os) 
      throws IOException {
  if (obj instanceof MimeMultipart) {
    try {
    ((MimeMultipart)obj).writeTo(os);
    } catch (MessagingException e) {
    throw new IOException(e.toString());
    }
  }
  }
}
origin: it.unimi.di/mg4j-big

public CharSequence title() {
  final String subject; 
  try {
    subject = message.getSubject();
  }
  catch ( MessagingException e ) {
    throw new RuntimeException( e.toString() );
  }
  if ( subject == null ) return (CharSequence)factory.resolve( MetadataKeys.TITLE, factory.defaultMetadata );
  else return subject; 
}

origin: it.unimi.dsi/mg4j-big

public CharSequence title() {
  final String subject; 
  try {
    subject = message.getSubject();
  }
  catch ( MessagingException e ) {
    throw new RuntimeException( e.toString() );
  }
  if ( subject == null ) return (CharSequence)factory.resolve( MetadataKeys.TITLE, factory.defaultMetadata );
  else return subject; 
}

origin: it.unimi.di/mg4j

public CharSequence title() {
  final String subject; 
  try {
    subject = message.getSubject();
  }
  catch ( MessagingException e ) {
    throw new RuntimeException( e.toString() );
  }
  if ( subject == null ) return (CharSequence)factory.resolve( MetadataKeys.TITLE, factory.defaultMetadata );
  else return subject; 
}

origin: it.unimi.dsi/mg4j

public CharSequence title() {
  final String subject; 
  try {
    subject = message.getSubject();
  }
  catch ( MessagingException e ) {
    throw new RuntimeException( e.toString() );
  }
  if ( subject == null ) return (CharSequence)factory.resolve( MetadataKeys.TITLE, factory.defaultMetadata );
  else return subject; 
}

origin: stackoverflow.com

 public void removeAttachment(String filename) {
  BodyPart part = new MimeBodyPart();
  DataSource src = new FileDataSource(filename);
  part.setDataHandler(new DataHandler(src));
  part.setFileName(filename);

  try {
    _multipart.removeBodyPart(part);
  } catch(MessagingException e) {
    Log.e(TAG, "Got Exception while removing BodyPart: " + e.toString(), e)
  }
}
origin: it.unimi.dsi/mg4j

public void close() throws IOException {
  super.close();
  try {
    folder.close( false );
    store.close();
  }
  catch( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.dsi/mg4j

public InputStream stream( final int index ) throws IOException {
  ensureDocumentIndex( index );
  try {
    // Can you believe that? Javamail numbers messages from 1...
    return folder.getMessage( index + 1 ).getInputStream();
  }
  catch ( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.dsi/mg4j-big

public InputStream stream( final long index ) throws IOException {
  ensureDocumentIndex( index );
  try {
    // Can you believe that? Javamail numbers messages from 1...
    return folder.getMessage( (int)( index + 1 ) ).getInputStream();
  }
  catch ( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.di/mg4j-big

public InputStream stream( final long index ) throws IOException {
  ensureDocumentIndex( index );
  try {
    // Can you believe that? Javamail numbers messages from 1...
    return folder.getMessage( (int)( index + 1 ) ).getInputStream();
  }
  catch ( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.di/mg4j

public void close() throws IOException {
  super.close();
  try {
    folder.close( false );
    store.close();
  }
  catch( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.di/mg4j-big

public void close() throws IOException {
  super.close();
  try {
    folder.close( false );
    store.close();
  }
  catch( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.dsi/mg4j-big

public void close() throws IOException {
  super.close();
  try {
    folder.close( false );
    store.close();
  }
  catch( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

origin: it.unimi.di/mg4j

public InputStream stream( final int index ) throws IOException {
  ensureDocumentIndex( index );
  try {
    // Can you believe that? Javamail numbers messages from 1...
    return folder.getMessage( index + 1 ).getInputStream();
  }
  catch ( MessagingException e ) {
    throw new IOException( e.toString() );
  }
}

javax.mailMessagingExceptiontoString

Javadoc

Override toString method to provide information on nested exceptions.

Popular methods of MessagingException

  • getMessage
  • <init>
    Constructs a MessagingException with the specified Exception and detail message. The specified excep
  • printStackTrace
  • getNextException
    Get the next exception chained to this one. If the next exception is a MessagingException, the chain
  • setNextException
    Add an exception to the end of the chain. If the end is not a MessagingException, this exception can
  • initCause
  • getCause
    Overrides the getCause method of Throwable to return the next exception in the chain of nested excep
  • superToString
    Return the "toString" information for this exception, without any information on nested exceptions.
  • getLocalizedMessage
  • addSuppressed
  • getStackTrace
  • setStackTrace
  • getStackTrace,
  • setStackTrace

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now