MailerG Code
Status: Planning
Brought to you by:
srgsoroka
File | Date | Author | Commit |
---|---|---|---|
src | 2009-01-12 | srgsoroka | [r3] changed message body to Object - so it will be ... |
.classpath | 2009-01-07 | srgsoroka | [r1] Initial upload |
.project | 2009-01-07 | srgsoroka | [r1] Initial upload |
XOM License | 2009-01-07 | srgsoroka | [r1] Initial upload |
gpl.txt | 2009-01-07 | srgsoroka | [r1] Initial upload |
licenses Java_EE_5_SDK_U6_SLA&Entitlement(20080903).txt | 2009-01-07 | srgsoroka | [r1] Initial upload |
parameters.xml | 2009-01-07 | srgsoroka | [r1] Initial upload |
readme.txt | 2009-01-07 | srgsoroka | [r1] Initial upload |
Project mailerg uses next libraries: 1. xom-1.1.jar (http://xom.nu/) XOM is Copyright 2002-2005 Elliotte Rusty Harold. According to http://xom.nu/: XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order. 2. postgresql-8.3-603.jdbc4.jar PostgreSQL is released under the BSD license. PostgreSQL Database Management System (formerly known as Postgres, then as Postgres95) Portions Copyright (c) 1996-2008, The PostgreSQL Global Development Group Portions Copyright (c) 1994, The Regents of the University of California Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. 3. JDK, javaee.jar and mail.jar The source code for the JavaMail API Reference Implementation is now available under the CDDL open source license, as a part of Project GlassFish. The project aimed to save time for elaborating of email. For this purpose all messages are saved in db PostgreSQL. PostgreSQL selected because is released under the BSD license, its PL/SQL language, and the way of managing concurrency through a system known as Multi-Version Concurrency Control. For start structure of DB is simple. Consists only from one table: CREATE TABLE messages ( id bigserial NOT NULL, sender character varying(100), message_uid integer, subject character varying(50), message_body bytea, data date, "time" time with time zone, CONSTRAINT scriptlance_pkey PRIMARY KEY (id) ) WITH (OIDS=FALSE); The field "message_uid" need for control last messages already downloaded and saved. Parameters for connect to DB and to mailbox are in file parameters.xml. They are: DBHost, MailUser, MailPassword, DBUser, DBPassword, DB. The last is name of database. There are 5 classes: DbMail for all operations with database. gMessage - simple class for main structure of message. Mail - for operations with email box. Params - for supply all parameter for connetct to database, email, etc. Main - is a class that contains main procedure. There are problems: 1. Sometimes problem cast to java.lang.String. 2. Sometimes problem with encoding UTF8 to WIN1252. 3. Possible problem with length of subject. Hope to solve in near future.