Examples of EnhancedMimeMsg


Examples of org.gjt.mail.EnhancedMimeMsg

      StringBuffer msgText = new StringBuffer();

      msgText.append( "BugRat could not process the attached message.\n" );

      EnhancedMimeMsg email = new EnhancedMimeMsg( session );

      Vector attach = null;
      if ( msg != null )
        {
        attach = new Vector();
        attach.addElement( msg );
        }

      email.buildMimeMessage
        ( from, from, toAddrs, null, null,
          subject, msgText.toString(), attach );

      Transport.send( email );
      }
View Full Code Here

Examples of org.gjt.mail.EnhancedMimeMsg

        msgText.append( "     " );
        msgText.append( errEx.getMessage() );
        msgText.append( "\n" );
        }

      EnhancedMimeMsg email = new EnhancedMimeMsg( session );

      Vector attach = null;
      if ( msg != null )
        {
        attach = new Vector();
        attach.addElement( msg );
        }
     
      email.buildMimeMessage
        ( from, from, toAddrs, null, null,
          "BugRat Report Error",
            msgText.toString(), attach );

      Transport.send( email );
View Full Code Here

Examples of org.gjt.mail.EnhancedMimeMsg

  sendResults( Session session, Address to, Report rep )
    throws MessagingException, DBIException
    {
    String adminAddr = this.getAdminAddress();

    EnhancedMimeMsg msg = new EnhancedMimeMsg( session );

    Address from = new InternetAddress( adminAddr );
    Address[] toAddrs = new Address[1];
    toAddrs[0] = to;

    StringBuffer msgText = new StringBuffer();

    msgText.append(
        "Your bug report has been successfully processed by the\n" +
        "BugRat automated email reporting system.\n\n" +
        "Your report was assigned ID #" + rep.getId() + ".\n" +
        "You can review your report online at this address:\n" +
        // UNDONE this url MUST be a property!!!
        "   <http://www.gjt.org/servlets" +
        "/BugRatViewer/ShowReport.html/" +
        rep.getId() + ">\n\n" );

    msg.buildMimeMessage
      ( from, from, toAddrs, null, null,
        "BugRat Report Results (Subject:)",
          msgText.toString(), null );

    Transport.send( msg );
View Full Code Here

Examples of org.gjt.mail.EnhancedMimeMsg

    DBConfig config = DBConfig.getInstance();

    String adminAddr = this.getAdminAddress();
    String robotAddr = this.getRobotAddress();

    EnhancedMimeMsg helpMsg = new EnhancedMimeMsg( session );

    Address from = new InternetAddress( adminAddr );
    Address[] toAddrs = new Address[1];
    toAddrs[0] = to;

    StringBuffer msgText = new StringBuffer();

    String introText = config.getProperty( "bratm.helpIntro" );

    if ( introText == null )
      {
      msgText.append(
        "*** ERROR, getting help intro from database.\n" +
        "*** Property 'bratm.helpIntro' could not be found.\n\n" );
      }
    else
      {
      msgText.append( introText );
      }

    msgText.append
      ( "     ================= INSTRUCTIONS =================\n\n" );
    msgText.append
      ( "To report bugs via email, you send email to: " );
    msgText.append( robotAddr );
    msgText.append( "\n\n" );

    String instrText =
      config.getProperty( "bratm.helpInstruct" );

    if ( instrText == null )
      {
      msgText.append(
        "*** ERROR, getting help instructions from database.\n" +
        "*** Property 'bratm.helpInstruct' could not be found.\n\n" );
      }
    else
      {
      msgText.append( instrText );
      }

    this.appendFieldValues( msgText );

    Vector attach = null;
    if ( msg != null )
      {
      attach = new Vector();
      attach.addElement( msg );
      }

    helpMsg.buildMimeMessage
      ( from, from, toAddrs, null, null,
        "BugRat Email Help", msgText.toString(), attach );

    Transport.send( helpMsg );
    }
View Full Code Here

Examples of org.gjt.mail.EnhancedMimeMsg

          throw new MessagingException
            ( "error creating From address, " + ex.getMessage() );
          }
        }

      EnhancedMimeMsg msg = new EnhancedMimeMsg( sess );

      msg.buildMimeMessage
        ( this.fromAddr, this.fromAddr,
          this.toAddr, this.ccAddr, null,
          this.subject, this.msgBody, attach );

      Transport.send( msg );
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.