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