Codota Logo
MessagingException.toString
Code IndexAdd Codota 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)

  • Common ways to obtain MessagingException
private void myMethod () {
MessagingException m =
  • Codota IconException pex;Exception e;new MessagingException(pex.getMessage(), e)
  • Codota IconString s;new MessagingException(s)
  • Codota Iconnew MessagingException(addresses[i] + " is not an InternetAddress")
  • Smart code suggestions by Codota
}
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 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

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 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.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() );
  }
}

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() );
  }
}

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

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • Menu (java.awt)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now