package com.mindprod.bulk; /** * Copy to CustConfig.java and recompile. Configuration constants for customer. * This file must be customised, then the whole package recompiled. Whenever * you make any changes to this file, make sure you do a clean compile. * * In this fictious example you would send your bulk emails to * bulk@beeswax.org from sales@beeswax.org * * @author Roedy Green */ class CustConfig { // ------------------------------ FIELDS ------------------------------ /** * true if want to see voluminous SMTP debugging messages. */ public static final boolean DEBUGGING = false; /** * Does the send mail server require a password and logon. Usually yes. */ public static final boolean NEED_PASSWORD_TO_SEND = true; /** * Normally this is true, but some IAPs block the bulk emailer from talking * directly to any mailserver other than ones owned by the IAP. The symptom * is that all mailservers other than those owned by the IAP always appear * to be not working. In that case you must turn off email server * validation. */ public static final boolean VALIDATE_EMAIL_SERVERS = false; /** * Where bulk emails are sent to be relayed. RFC822 format. "first last * " */ public static final String BULK_EMAIL_ADDRESS = "pollinator "; /** * customer abbreviation. Used in creating filenames. */ public static final String CUST_ABBREVIATION = "BEE"; /** * Customer name. */ public static final String CUST_NAME = "Bees's Wax Society"; /** * Encoding for stats message send back to originator usually windows-1252, * ISO-8859-1, UTF-8 or US-ASCII. */ public static final String ORIGINATORS_PREFERRED_ENCODING = "UTF-8"; /** * Domain to identify as when probing mailservers. It is the DNS name * associated with your face IP of your workstation. * See http://mindprod.com/jgloss/faceip.html * e.g. "vc.shawcable.net" or "bchsia.telus.net" * Not the mailserver's domain. */ public static final String PROBE_DOMAIN = "bchsia.telus.net"; /** * host of the pop3 receive-mail server. You can send and receive emails on different accounts, * even different providers. Some ISPs insist you do all your sending via your email * account with them, but let your receive from other mail providers. */ public static final String RECEIVE_HOST = "pop3.beeswax.com"; /** * Login id for the bulk email receive account. case sensitive Usually this * is just the name of the account to the left of the @, but sometime the * email provider will use a completely separate name. */ public static final String RECEIVE_LOGIN_ID = "pollinator"; /** * pop3 name for the inbox. */ public static final String RECEIVE_MBOX = "INBOX"; /** * password for the bulk email receive account. case sensitive */ public static final String RECEIVE_PASSWORD = "sesame22"; /** * protocol used on the receive mail server. Only pop3 tested. Case * sensitive. */ public static final String RECEIVE_PROTOCOL = "pop3"; /** * host of the smtp send mail server. */ public static final String SEND_HOST = "smtp.beeswax.com"; /** * Login id for the bulk email send account. case sensitive Usually this is * just the name of the account to the left of the @, but sometime the email * provider will use a completely separate name. Set to "" if no login required. */ public static final String SEND_LOGIN_ID = "pollinator"; /** * password for the bulk email send account. case sensitive. Set to "" if no login required. */ public static final String SEND_PASSWORD = "sesame22"; /** * protocol used on the send mail server. Only pop3 tested. Case sensitive. */ public static final String SEND_PROTOCOL = "smtp"; /** * Minimal quality to accept in email addressos before evven testing them. * Number 1 .. 9. */ public static final int EMAIL_ADDRESS_QUALITY = 1; /** * Max emails can send in total, usually the daily limit your ISP imposes. */ public static final int MAX_EMAILS_IN_BATCH = 900; /** * Max emails, each with BCCs can send without logging off and on again to * the email server. Ideally is the same as MAX_EMAILS_IN_BATCH. */ public static final int MAX_EMAILS_PER_LOGIN = 15; /** * How long to wait for a mailserver to respond before giving up on it. */ public static final int PROBE_TIMEOUT = 20/* seconds */ * 1000; /** * port of the pop3 receive mail server, usually 110. */ public static final int RECEIVE_PORT = 110; /** * port of the smtp send mail server, usually 25, sometimes 24.. */ public static final int SEND_PORT = 25; /** * How long to go before culling a domain nobody emails to, in milliseconds * Also used to cull list of already sent email message ids. Advanced. * Normally do not change. */ public static final long CULL_INTERVAL = 60/* days */ * ( 24 * 60 * 60 * 1000L ); /** * How long to go before reprobing after a failed domain in milliseconds. * Advanced. Normally do not change. */ public static final long FAILED_PROBE_INTERVAL = 1/* hours */ * ( 60 * 60 * 1000L ); /** * history Mask. Which historical probes to consider when the latest probe * was bad. With any past good history we assume the domain is good, * just temporarily down, So long as it has good DNS records for mailservers * as of the most recent probe. High order bit is most recent probe, * 1=consider 0=ignore. Advanced. Normally do not change. */ public static final long HISTORY_MASK = 0xff00000000000000L; /** * How long to go before reprobing a good domain, in milliseconds. Advanced. * Normally do not change. */ public static final long PASSED_PROBE_INTERVAL = 7/* days */ * ( 24 * 60 * 60 * 1000L ); /** * How long sleep before checking again for incoming email Advanced. * Normally do not change. */ public static final long SLEEP_INTERVAL = ( DEBUGGING ? 15 : 30 )/* seconds */ * 1000L; /** * List of people who get a copy of every bulk email to monitor use of the * product. If they are senders, they will get only one copy. RFC822 format. * "first last " */ public static final String[] MONITORS = { "Roedy Green "}; /** * Domains that despite all evidence, are actually bad. Don't bother to * test them, just treat them as bad. */ public static final String[] TREAT_AS_BAD_DOMAINS = { "home.com", "nowhere.com", "invalid.com", "nospam.com",}; /** * Domains that despite all evidence, are actually good. Don't bother to * test them, just treat them as good. */ public static final String[] TREAT_AS_GOOD_DOMAINS = { "aol.ca", "aol.com", "hotmail.com", "shaw.ca", "telus.net",}; /** * name of the file containing the list of email addresses to forward this * email to. case insensitive. */ public static final String[] VALID_ATTACHMENT_NAMES = { "emails.txt", "emails1.txt", "emails2.txt", "emails3.txt", "emails4.txt", "emails5.txt", "emails6.txt", "emails7.txt", "emails8.txt", "emails9.txt", "canadanewspapers.txt", "cbc.csv", "bcnewspapers.txt", "test.csv", "victoriacouncillors.txt",}; /** * List of legal MIME types for the message body. */ public static final String[] VALID_MIME_TYPES = {"text/plain", "text/html"}; /** * Who is allowed to use the bulk mail resender. case sensitive. Just the * computer xxx@xxxx part. */ public static final String[] VALID_SENDERS = { "lorna@beeswax.org", "admin@beeswax.org", "bulk@beeswax.org", "beeswax@beeswax.org", "info@beeswax.org", "sales@beeswax.org", "library@beeswax.org",}; // --------------------------- CONSTRUCTORS --------------------------- /** * dummy constructor. All fields are static */ private CustConfig() { } }// end CustConfig