Open Business Objects for EDI
v3.5.2

com.americancoders.mail
Class OutgoingEDIMail

java.lang.Object
  extended bycom.americancoders.mail.OutgoingEDIMail

public class OutgoingEDIMail
extends java.lang.Object

Class to send EDI Documents via Internet Mail
Class contains a main method to allow it to invoked as an application.
format: java com.americancoders.edi.OutgoingEDIMail hostid userid toWhom filename
where hostid is the name of your incoming mail server
userid mailid to get mail
toWhom userid to receive file
filename file to be mailed, file will be wrapped around MIME type applicaiton/edi/x12

OBOE - Open Business Objects for EDI

Part of the OBOE Extended Package
An EDI and XML Translator Written In Java
Copyright 1998-2007 - American Coders, LTD - Raleigh NC USA
All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com

Version:
3.5.2
Author:
Joe McVerry - American Coders, Ltd.

Constructor Summary
OutgoingEDIMail(java.lang.String inHost, java.lang.String inUser)
          construct with host, user protocol.
 
Method Summary
static byte[] decode(byte[] data)
          to decode to 8bit ascii
static byte[] encode(byte[] data)
          encode for encrypted text is 8-ascii
static void main(java.lang.String[] argv)
          simple test procedure
    SMTP 553 To send mail, first check your mailwith a valid POP account; this prevents unauthorized SPAM relaying. (#5.7.1)
 void sendEDIDocument(java.lang.String message, java.lang.String toWhom, boolean sendMDN)
          send a document, uses the other sendEDIDocument with debugging turned off
 void sendEDIDocument(java.lang.String message, java.lang.String toWhom, boolean sendMDN, boolean debug)
          send a document, optional debugging switch.
 void sendEncryptedEDIDocument(java.lang.String message, java.lang.String toWhom, boolean debug)
          send an encrypted document, optional debugging switch.
 void sendMDNResponse(java.lang.String toWhom, boolean lookedAt)
          send an MIME Message Delivery Notification back to sender
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded response text
hardcoded reported as automatic-action in MDN disposition
 void sendSignedEDIDocument(java.lang.String message, java.lang.String toWhom, boolean debug)
          send an signed document, optional debugging switch.
 void setKeyStore(java.lang.String inKeyStoreFileName, java.lang.String inKeyStorePassword)
          set the key store construct
 void setupForPOP(java.lang.String inPOPID, java.lang.String inPOPPassword)
          set up POP server control for anti spam servers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutgoingEDIMail

public OutgoingEDIMail(java.lang.String inHost,
                       java.lang.String inUser)
construct with host, user protocol. as of now the only protocol supported is SMTP

Parameters:
inHost - String internet mail host
inUser - String Internet mail id associated at Mail host
Method Detail

main

public static void main(java.lang.String[] argv)
simple test procedure

Parameters:
argv - String array

setKeyStore

public void setKeyStore(java.lang.String inKeyStoreFileName,
                        java.lang.String inKeyStorePassword)
                 throws java.lang.Exception
set the key store construct

Parameters:
inKeyStoreFileName - String - encryption key file name
inKeyStorePassword - String - encryption key file password
Throws:
java.lang.Exception - Probably something wrong with KeyStore fields.

setupForPOP

public void setupForPOP(java.lang.String inPOPID,
                        java.lang.String inPOPPassword)
set up POP server control for anti spam servers.

Parameters:
inPOPID - String
inPOPPassword - String

sendEDIDocument

public void sendEDIDocument(java.lang.String message,
                            java.lang.String toWhom,
                            boolean sendMDN)
send a document, uses the other sendEDIDocument with debugging turned off

Parameters:
message - String the EDI Document
toWhom - String target audience
sendMDN - booelan, attach message disposition notification MIME object

sendEDIDocument

public void sendEDIDocument(java.lang.String message,
                            java.lang.String toWhom,
                            boolean sendMDN,
                            boolean debug)
send a document, optional debugging switch.
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded mime type applciation/edix12

Parameters:
message - String the EDI Document
toWhom - String target audience
sendMDN - boolean attach message disposition notification MIME object
debug - boolean to turn on java.mail debugger

sendEncryptedEDIDocument

public void sendEncryptedEDIDocument(java.lang.String message,
                                     java.lang.String toWhom,
                                     boolean debug)
send an encrypted document, optional debugging switch.
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded mime type applciation/edix12

Parameters:
message - String the EDI Document
toWhom - String target audience, keyStore key
debug - boolean turn on java.mail debugger

sendSignedEDIDocument

public void sendSignedEDIDocument(java.lang.String message,
                                  java.lang.String toWhom,
                                  boolean debug)
send an signed document, optional debugging switch.
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded mime type applciation/edix12

Parameters:
message - String the EDI Document
toWhom - String target audience, keyStore key
debug - boolean to turn on java.mail debugger

sendMDNResponse

public void sendMDNResponse(java.lang.String toWhom,
                            boolean lookedAt)
send an MIME Message Delivery Notification back to sender
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded response text
hardcoded reported as automatic-action in MDN disposition

Parameters:
toWhom - String target audience
lookedAt - boolean, was the message looked at

encode

public static byte[] encode(byte[] data)
encode for encrypted text is 8-ascii

Parameters:
data - byte array of text to encode
Returns:
byte array of encoded text

decode

public static byte[] decode(byte[] data)
to decode to 8bit ascii

Parameters:
data - byte array of encoded text
Returns:
byte array of decoded text

Open Business Objects for EDI
v3.5.2


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.