How to mail

  Mail Migration from BEJY 1.2.x.y to 1.3.1.49

Since there is a new table "Response", added with version 1.3.1.49, to support server managed autoresponses,

  • Create the new table Response - this depends on the used database.
    MySQL
    CREATE TABLE Response(
    id INT NOT NULL AUTO_INCREMENT,
    id_mail_user INT NOT NULL,
    response VARCHAR(255),
    FOREIGN KEY (id_mail_user) REFERENCES mail_user (id),
    PRIMARY KEY (id),
    UNIQUE UC_id (id));
    

    MSSQL
    CREATE TABLE Response(
    id int identity(1,1) NOT NULL CONSTRAINT PK_Response1 PRIMARY KEY,
    id_mail_user int NOT NULL,
    response varchar(255) NULL,
    CONSTRAINT UC_Response1 UNIQUE(id));
    
    ALTER TABLE Response
    ADD CONSTRAINT FK_Response_1
    FOREIGN KEY (id_mail_user) REFERENCES mail_user (id);
    
  • Extend the existing mail_user table
    MySQL
    ALTER TABLE mail_user MODIFY keep TINYINT(1) DEFAULT '1';
    ALTER TABLE mail_user ADD reply TINYINT(1) DEFAULT '0';
    

    MSSQL
    ALTER TABLE mail_user DROP COLUMN keep;
    ALTER TABLE mail_user ADD keep TINYINT DEFAULT '1';
    ALTER TABLE mail_user ADD reply TINYINT DEFAULT '0';
    
  • Extend the existing forward table
    MySQL and MSSQL
    ALTER TABLE forward ADD notify TINYINT DEFAULT '0';
    
  • set the keep flag to 1 for all users. To enable no-reply-mail accounts, which do not keep the mail, set those manually to 0
    MySQL and MSSQL
    update mail_user set keep=1;
    
  • Now use the supplied JSP page mail.jsp to maintain the accounts, add mail forwarder or mail notifications, aut responses or mail sinks (no reply accounts).
 
(c) by Stefan Bebbo Franke in 2000-2003, all rights reserved