2.8.2

Security Fix - There was an issue when setting the ``REFERER_CHECK to '1' in 2.8 and 2.8.1. Doing so would actually circumvent mojo's security when logging into a list control panel. Bad news. This has been fixed, although setting it seems to break logging into Mojo Mail using a Mozilla-based browser. Please note.

I've done some more work on cookies being set correctly. Another, slightly related problem is with HTML forms in Mojo Mail, which seemed to NOT get auto-escaped, as the CGI.pm docs said they would be. I thought this was some sort of odd condition with setting the charset, but it isn't. The way I fixed the form values not being auto-escaping is by changing every subroutine call to CGI.pm subroutines to method calls. For some odd reason, I think mixing the two styles is a bad idea.

I ``fixed'' the cookie problems by setting a throwaway cookie before the cookie I really want set. For some reason, CGI.pm wasn't writing the cookie value correctly.

mojo_send.pl has be recommitted because insanity in the community. The version provided in this distro should also work for version 2.8 and 2.8.1.

I found that if you have a list name that has a double qote (``) in the name itself, mail using this address may not always be sent, since the To: header wouldn't be formatted correctly. I've fixed this problem, and if you had problems with receiving subscription notices, password emails, etc, a funky email address may be why.

2.8.1

  1. /22/03
    mojo_send.pl was taken out of the distribution. A note was put in its place to kindly tell people the.. obvious.

    Bug Fixes

    Editing Email Messages via the list control panel sometimes causes an Internal Server Error. This should be fixed.

    Some users have been complaining that it is impossible to actually log into the list control panel. After the password information is entered into Mojo, the user is now refreshed into the list control panel, instead of being redirected. This was suggested by an anonymous user. Thanks anonymous user, (whoever... you, are).

    There was a formatting error in the ``Advanced Sent a List Message'' page. Apparently, version 2.91 of CGI.pm doesn't autoescape double quotes.

    The %SQL_PARAMS hash in MOJO::Config looks like this:

     %SQL_PARAMS = ( 
     database         => '',
     dbserver         => '',           
     port             => '',           
     dbtype           => '', # 'mysql' for 'MySQL', 'Pg' for 'PostgreSQL'  
     user             => '',          
     pass             => '',
    
    
     subscriber_table => 'mojo_subscribers',
    
     ) unless keys %SQL_PARAMS;

    The addition of the needed 'subscriber_table' key, and a little help on how to set the 'db_type' value.

    Debug code dealing with [redirect] tags has been taken off.

    Content-type header tags were, in some instances, NOT printed. This has been fixed.

    You don't have to explicitly set the $S_MOJO_URL if you use an outside config file now.

    setting $LIST_IN_ORDER to ``1'' should do as advertised with Plain Text Lists. It's still HIGHLY (bolded, underlined) recommended that you not set $LIST_IN_ORDER to ``1'' if you're using a Plain Text list.

2.8 BETA 1

  1. /2/03
    $LOGIN_COOKIE_NAME holds the name of the cookie for Mojo Mail. This can be changed to stop mucking up other web apps that use cookies. (set to 'mojologin' by default)

2.7.3 alpha3

2.7.3 alpha2

2.7.3 alpha

2.7.2

Black lists should be working for everyone again.

Bulk Mailing Precendences can now, um, NOT be set. The can also be successfully default in %LIST_SETUP_DEFAULTS

The From: header in all messages sent are now escaped when the have double quotes in them. A bug has been sent to the maintainer of Mail::Tools about this.

The newest version of Mail::Address has been put into Mojo Mail.

A simple check has been placed on the Advanced Mail Settings ``add the -f flag'' setting. If the effective uid isn't the same as the reail uid, an warning is presented.

2.7.1 beta3

Lists in the popup menus and on the default page are now in alphabetical order (an amazing world we live in today) - this is a sorta bug - fixed.

calling Guts::open_database with a list name that doesn't exist creates a blank db with nothing in it. I couldn't believe there wasn't a check to see if the db being called actually exists. It does now.

many instanced where ``use of uninitialized errors'' warnings where plugged

Amazingly enough, I'm having good luck running Mojo Mail with the '-T' flag, I don't really know why! :)

2.7.1 beta2

email, pin, list and flavor params given to Mojo Mail are filter to prevent XSS.

Messages were getting archived even when archiving was turned off - fixed.

When creating a new list and an error was encountered when filling out the form, the user was redirected to the default page - fixed.

there was a bug in the add_to_email list function in MOJO::MailingList::Subscribers::PostgreSQL that would come up if you tried to subscribe to a list. This has been fixed. This bug would only affect people using PostGres as their backend.

POP3 passwords are now Cipher encrypted in the list settings database. YOU WILL NEED TO RECONFIGURE THE POP3 PASSWORD IF YOU USE POP-BEFORE-SMTP AUTHENTICATION.

The program setup check has been fixed, it should now come up if the program wasn't setup correctly. Furthermmore, more information about the setup can be viewed, with hints on what, if anything, is wrong. ( $MOJO_URL?f=setup_info ) Funnily enough, if you didn't setup the $MOJO_RUL variable correctly, you won't be able to see any of the setup info.

Cipher keys can be reset for all lists. ($MOJO_URL?f=reset_cipher_keys)

For security and functional reasons, this line:

 use CGI::Carp "fatalsToBrowser";

in mojo.cgi has been commented out. DNS lookups would return a Software Error, even when the DNS lookup succeeded.

It is still suggested that if you have problems configuring the script that you uncomment this line FOR TESTING PURPOSES and then, comment it again.

2.7.1 beta1

small formatting bug fixed in ``need_to_login'' error screen

password changes are now confirmed when a new password has to be sent out to the list owner.

passwords saved in the browser's cookie are now encrypted much stronger using CipherSaber encryption

The Return-Path Header Can now be set on a list basis.

2.7

Lots of things. Too many to remember.

2.6.8

There's a new module, called MOJO::Template::Widgets for making widgets. All it has now is a subroutine called list_popup_menu() That'll give you a select box for all the lists. This is used throughout the site and previously, ever instance had slightly different code. No more!

Test messages were being archived in some instances. no more!

The SMTP option sometimes couldn't be set. No more!

Some HTML Sybtax errors have been fixed.

2.6.7

Some email messages were being sent blank. No more!

There's a new variable in the Config.pm file called:

$DEFAULT_ADMIN_SCREEN

set to:

$MOJO_URL.'?flavor=send_email';

perhaps you can figure out what it does.

2.6.6

  1. 06/11/02
    Tweaked the MOJO::Guts::check_setup() sub to warn if people try to use MOJO on NT, the check is disabled for NT folk.

    There was a report that if the root password is left blank or is commented out in the Config.pm file, you can log into ANY list using a blank password. The documentation specifically says that if the root password is left blank, this password is disabled. This should now be the case.

    The outside config file-getter, MOJO::Config::_config_import was making use of the getpwuid Perl function, which isn't supported in a WinNT environment. There is now a check to see if the script is infact in a WinNT environment and only uses this function if it isn't.

2.6.5

  1. 06/08/02
    I removed the submit button on the ``Add Subscribers'' screen. it's back. I'm the absent-minded professor.

2.6.4

  1. 06/01/02
    Added a file upload form to add() so you don't have to cut and paste in everything

  2. 05/25/02
    Tweaked how Config.pm imports an outside config file.

    the [subscriber_email] should work now.

    print_out_list List::* wasn't allowing you to pass the filehandles for any of the SQL's

    added a new method in MOJO::MailingList::Subscribers

    write_plaintext_list()

     write_plaintext_list() will write your subscriber list in a plain text format and return
     the filename. What's the point? It makes sense if you're using on of the List::*SQL's as the 
     subscriber database. mojo::send_list_to_admin was just using the subscription list name 
     and sending that, well, that isn't around when you're using a SQL backend. 
    
    
     in MIME::Lite, set both $PARANOID and $QUIET to '1' in hopes that errors
     it's throwing will stop, even though they shouldn't be throwin' the errors.
    
     fingers crossed.
    
     exists does work correctly on some of the DB File formats. took one instance of 'exists' out
     and changed it to defined, which should be alright

  3. 05/08/02
    $SMTP_ADDRESS is really just a default setting, each list can issue it's own SMTP server to use, changed the code to reflect this idea. This was a little whacky in Mail.pm where it would look at the $SMTP_ADDRESS variable instead of $self->{list_info}->{smtp_server} which does get set to $SMTP_ADDRESS by default.

    turned off the check_setup() list directory test for WinNT folk. Beware! I don't know why the stat() file tests aren't working, I guess they're not implemented as well on WinNT systems ?

2.6.3

  1. 04/22/02
    Added a filter in MOJO::Mail::Send::clean_headers to change CC headers into Cc headers

    tweaked mojo_send.pl to look at the Cc header instead of CC

    'mail_group_message_to_poster' and 'add_reply_to' checkboxes should 'stick' or 'unstick' now

    in mojo.cgi::mojo_send_options()

    The Config.pm file now checks a an absolute path instead of a file handle to see if there's a outside config file.

    you are using an outside config file, aren't you?

    Added documentation for the multiple_subscribe mini script

    The Config.pm.pdf link should be fixed in the docs

    added the following mime thingies to the Config.pm file:

            '.doc'  => 'application/msword',
            '.xls'  => 'application/x-msexcel',
            '.ppt'  => 'application/x-mspowerpoint',
    
    
            '.mp3'  => 'application/octet-stream',
            '.mov'  => ' video/quicktime',

2.6.2

  1. 04/14/02
    typo in $NOT_ALLOWED_TO_POST_MESSAGE corrected

    cookies are set with a path of '/' since some servers where actually setting the wrong path

    line 129 in mojo_send.pl was missing 'new'

            my $mh = MOJO::Mail::Send->new(\%list_info); 
    
    
    Guts::check_for_double_email should obey whatever $Config::EMAIL_CASE is set to.

Version 2.6.1

  1. 04/09/02
    fixed a bug in mojo_send.pl in the send_back_email() sub:

    425: To => $From_address,

    changed to:

    425: To => $From_address->address,

    a few other places like this were changed as well.

    added a Mojofied FormMail script to the distro.

    fixed a bug in mojo_stats.pl pertaining to the list_option_form() that's now called via an OO interface.

Version 2.6

  1. 4/06/02
    Added a sample FLA subscription form as an example on how to use Mojo Mail using Flash.

    Version 2.6 BETA
  2. 3/30/02
    Added a test to see if Mojo is set up correctly when default() is called in mojo.cgi, should stop lots of people from getting a Server Error when they try to make a list in a dir that doesn't exist.

  3. 3/27/02
    Mail::BulkMail mergeing was clobbered... fixed.

    MIME_HUSH is actually implemented! (wow!)

    There is PDF version of the Config.pm docs... Just because I have a Mac and I can.

    Stylesheet applied to docs

    More docs written

    Southpark == funny tonight

  4. 03/26/02
    in mojo_send.pl, fixed $To_address->address to read @To_addresses at:

    327: $mh->do_not_send_to([@To_addresses]);

    in Mail.pm, the List-Headers should work correctly again.

    lists were getting escaped twice when making subscription/unsubscription links - this has been fixed

    black lists were only working for the first black listing, this only seems to have problems with PlainText.pm, this has been fixed.

    new list passwords were NOT being created when a list owner asks for a new one, something got clobbered, this is fixed.

    the list's shortname was used in a whole bunch of places where the list_name should have been used. This has been fixed.

    the functions, user_error() and check_list_security() have been moved into Guts.pm, along with my roommates who 'forget' to pay the @home bill

    I don't know why I created this, but the Admin Control Panel is now, (get this) plugin-able

    You can now, with just a bit of moxy, roll your own Admin Control Panel Screen to do just, about, anything. There are two examples in mojo/scripting_examples/admin_plugins/ One is useless, but gives you a good overview on how this all works, the other one allows you to all your list settings This is fantastic, cause now more specific features can be created, without bogging down the piggy mojo.cgi script. This is a good thing. I wonder if anyone will make any...

  5. 03/25/02
    I'm using sort of a 'make me a distro' script to automate the process of making ... a distro.
    
    working good. perhaps I'll make an installation one too!

    The distro shouldn't have those annoying '.DS_Store' files, thanks to the new make_distro thing I made

    The Config.pm is now set up to read from a outside config file, so people don't have to redo the Config.pm file everytime they want to upgrade. yes. you are welcome. it's set to read the config file at $ENV{DOCUMENT_ROOT}/mojo_config

    if you need to change that, change it in the Config.pm file, I suggest your home directory and then .mojo_config I have to do some research on how you find a home directory via a CGI script. Any help == welcome

    this file can have any $variables, @arrays or %hashes that are in the Config.pm file except things that are between BEGIN {} brackets. Those cannot be changed after runtime, sorry.

    the config file can be as simple as:

            $MOJO_ROOT_PASSWORD = 'pa$$word';
    
    
            $FILES      = '/home/account/mojo_lists';
    
            $MAILPROG = '/usr/sbin/sendmail';
    
            $MOJO_URL ='http://mysite.com/cgi-bin/mojo/mojo.cgi';

    added the '$TMP' variable to the Config.pm file for temporary file... stuff.

  6. 03/24/02
    The Config.pm comments have been converted into pod so I don't have to write two different versions of the same things

    There's a new variable in the Config.pm file, called $PLAIN_TEXT_ENCODING which has been set to 8bit by default.

    added the '%LIST_SETUP_OVERRIDES' hash to the Config.pm to override any set list pref.

    added the 'mail_group_message_to_poster' setting

  7. 03/22/02
    um, you should be able to set add_sendmail_f_flag via ``Sending Options : Advanced...'' for real now

    cleanup of mojo_send.pl a bit

    mojo_send.pl should now recognize if you send to a list using the CC: header

  8. 03/20/02
    List::MySQL now has Unix Line Endings

    MIME::Type.pm and MIME::Types.pm have been added to the distro

  9. 03/15/02
    in mojo.cgi, in the list_invite() function, $mh->bulk_send is spelled correctly.

    in Mail.pm the do_not_send_to method should work

    added the 'add_sendmail_f_flag' pref to allow you to add the -f flag to the $MAIL_SETTINGS variable in sendmail sending

    MOJO::Mail::Send::clean_headers takes off extra newlines from the ends of mail headers

    pray that fixes that mojo_send.pl send problem

    O3/03/02
    More cleanups,

    All Config variables are in UPPERCASE

    all modules now are in MixedCase, CONFIG.pm is now Config.pm

  10. 03/02/02
    new methods in MAIL.pm
            list_type
            bulk_test
            bulk_start_email 
            bulk_start_num
            do_not_send_to

    these take the place of similar-named headers, which really didn't make much sense anyways

    $mh->do_not_send_to(['justin@skazat.com']);

  11. 03/01/02
    MAIL.pm

    usage of:

            $fields{send_via_smtp}

    has been replaced with:

            $self->{list_info}->{send_via_smtp}
            $self->{list_info} is set in the new() method:
            my $mh = MOJO::Mail::Send->new(\%list_info);

    same with:

            Strip-Headers          (strip_message_headers)
            List_Sleep             (bulk_sleep_amount)
            Bulk_Amount            (bulk_send_amount)
            List_Batch             (enable_bulk_batching)
            Batch_Notification     (get_batch_notification) 
            Finished_Notification  (get_finished_notification)

    new function in MAIL.pm:

    _make_list_headers

    this function creates the following headers:

            Organization
            List
            List-URL
            List-Owner
            List-Unsubscribe
            List-Subscribe
            List-Archive                    (show_archives)

    which means, you don't have to set these anywhere else. This really cleans up some messes in mojo.cgi

    new function in MAIL.pm:

    _make_general_headers

    which (at the moment) makes default headers for:

            From
            Errors-To

    and also makes sure they're escaped as in accordance to some hard to read RFC, i'm sure

    I'm beginning to put defaults for list stuff in the CONFIG.pm file (what a concept) instead of just peppered everywhere, looks like this right now:

    
            use_pop_before_smtp => 1,
            smtp_server         => $smtp_address,
            add_reply_to        => 1,
            precedence          => 'list', 
            charset             => 'English (en)    iso-8859-1',
            content_type        => 'text/plain',
            priority            => 3,
            archive_show_month  => 1,
            archive_show_day    => 1,
            archive_show_year   => 1,
            archive_index_count => 10,
    
    this can really clean up the open_database() function in Guts.pm

    MIME::Lite has been upgraded to 2.117

    Mail::Address has been upgraded to 1.43

    Mail::Bulkmail is still at 2.05 on CPAN, the version of Mail::Bulkmail in the mojo distro has 2 bug fixes that aren't available in the CPAN version (crazy, eh?)

  12. 02/28/02
    There is now a MySQL module in the distro. The PostGreSQL schema works for this module

    In mojo_send.pl, you can now turn on and off the Reply-To header, weee

  13. 02/27/02
    added documentation for the bounce handler

    took off all Return-Path headers in mojo.cgi and mojo_send.pl cause they're useless (i think)

    all Error-To: headers are set to the admin_email

  14. 02/25/02
    in mojo_send.pl, the 'To: is the same as the From:' check is now case insensitive, as is the test to see if a message is being sent out by either the admin or list owner in send_announce_email() and send_group_email()

    mojo_send.pl now used the new subscribe_link() and unsubscribe_link() functions from Guts.pm

    for group mailings, mojo_send.pl does not leave a trail of Re: Re: Re:'s (and there was much rejoicing) it also looks for AW:

    I added instructions for sendmail in the mojo_send.pl pod

  15. 02/09/02
    $file_chmod works now as advertised! (and there was much rejoicing)

    the List Information screen now shows the list's short name, which is WHAT YOU WANT TO USE FOR mojo_send.pl

  16. 02/03/02
    new function in MAIL.pm,

    bulk_send_bulk_smtp()

    Hopefully, this will take some more heft out of the main bulk_send() subroutine

    new sub, sub _pop_before_smtp() and with that, POP-before-SMTP Authentication support. This should help people use an SMTP connection, instead of, *sigh* sendmail

    Some of the Net Modules will be bundled in the download

    the MAIL object can now have stuff passed to it, like this:

    my $mh = MOJO::Mail::Send->new(\%list_info);

  17. 02/02/02
    new function in MAIL.pm, _strip_fields()

  18. 02/01/02
    I'm trying to slim down the bulk_send() function,

    a new function, called _email_batch_notification has been created to move the email batch notification stuff out of the bulk_send() function (amazingly enough)

    ditto with _email_finished_notification()

    ditto with _mail_error_no_start_email()

    ditto with _mail_error_no_start_num()

    #lines of bulk_send() before: 460 #lines of bulk_send() after: 354

    still too too many lines...

    added a new variable to CONFIG.pm, '$mime_hush' to try and quiet down MIME::Lite, calls the MIME::Lite->quiet() method if set to 1

    plain text messages with no attachments are now sent as 'quoted-printable' instead of binary(?)

  19. 01/29/02
    CONFIG.pm tweaks, $LOG{mailings} is now defaulted to 0, $list_in_order is defaulted to 0

    new function, message_id() in Guts.pm returns an id based on the date.

    two new functions in Guts.pm,

    subscribe_link() and unsubscribe_link() that return a url to sub and unsub.

  20. 04/14/01 through 01/01/02
    updates for this period have not been recorded, but they are many. yes, i'm lazy.

Version 2.5

  1. 04/12/01
    Mailing your lost password works again! yes yes yes, I have no no no idea what was going on.

    also, having the passwords saved as rot13 encrypted didn't go over when you wanted to allow the root password to log into lists, but this is now fixed. Thanks everyone who yelled at me.

  2. 04/08/01
    I started making a the list subscribe url a bit smaller, without totally changing the way I do things, I just truncate what the variables are called, and see if those are passed, or their longer cousins:

    Long Version:

    http://dev.skazat.com/cgi-bin/mojo/mojo.cgi?flavor=unsubscribe&list=big_list&email=justin@skazat.com&pin=1234

    Short Version:

    http://dev.skazat.com/cgi-bin/mojo/mojo.cgi?f=u&l=big_list&e=justin@skazat.com&p=1234

    seems to make a noticable difference, although my example is still over 70 characters long, This is a cutoff point, at least for terminals.

  3. 04/08/01
    I added a lock file for unsubscriptions to the list. A lock file will stop anyone trying to unsubscribe from a list while someone else is doing the same thing a bit before. People are having lists wiped out, and I think there is a race condition in the remove_from_list() subroutine. The routine now goes something like this:

    Create a lock file that will stop anyone from doing what's in between opening this file, and closing this file.

    open the list open a temp list

    copy over all addresses in the list into the temp list, unless we don't want them anymore

    close both lists

    #######################

    open the temp list, open the list

    copy what's in the temp list to the real list.

    close the lock file.

    If this subroutine is busy, the script will sleep one second, for ten times while waiting for the lock to clear. it gives up after that, and returns 'too busy' - I also added another user_error error that prints that the server is too busy.

    
    =item B<4/4/01>

    The unsubscribe feature for the admin side was broken. easy fix, forgot to tell it what list to do the axes in.

    I'm also changing the fiule structure a bit to be more unix-centric, all files will be in the mojo directory, like the mojo_extras directory.

  4. 3/29/01
    Tweaked the POD docs in all the modules. wee.

    I also added the '$mime_paranoid' variable to the CONFIG.pm file to be used with the $MIME::Lite::PARANOID variable in MIME::Lite. From the docs of MIME::Lite:

            If true, we won't attempt to use MIME::Base64/MIME::QuotedPrint, even if 
            they're available. Default is false.

    That means you don't need the MIME::Base64/MIME::QuotedPrint modules no mo.

    I also added the $NPH variable to CONFIG.pm, specifically for Windows servers. It seems that cookies aren't set or sent back correctly to M$ IIS without no parse headers turned on. This is done by setting $NPH to one. The only place I'm using this is in the login() function in the mojo.cgi script, that looks a bit like this:

            print $input->redirect( -uri      => $location,
                                    -COOKIE   => $cookie,
                                    -nph      => $NPH, 
                                                            );

  5. 03/27/01
    well, if you hadn't noticed, there are a *few* examples of mojo helper scripts, check check it

    also, added a new 'list invite' feature.

    Also, changes made to modules are logged in the modules that are changed, in POD format.

  6. 03/1/01
    I've been working on the port of mojo to NT, I want to keep only one version of the script if possible.

    I changed all code that's similar to this:

            print "Location:$mojo_url?flavor=change_info&done=1\n\n";

    to this:

            print $input -> redirect(-uri=>"$mojo_url?flavor=change_info&done=1");

    I also added the nph' flag for the redirect when the cooie is being passed to the script, like this:

            print $input->redirect( -uri      => $location,
                                                            -COOKIE   => $cookie,
                                                            -nph      => 1, 
                                                                                                              );

    This seemed to make M$ IIS happier.

  7. 03/4/01
    fixed a problem with the archives, the back link on the archive indexes was fumbled in some circmstances,

    in Archive.pm, what used to read

            $back    = ($stopped_at - ($iterate*2));
    
    
    is now changed to:
    
            # let see if we're at some weird halfway between point
            my $mod_check = $stopped_at % $iterate; 
            my $fixer; 
            my $full_stop = $stopped_at;
    
            if($mod_check > 0){ 
                    # substract it from the iterate 
                    $fixer = $iterate - $mod_check; 
                    $full_stop +=  $fixer; 
            }
    
            $back    = ($full_stop - ($iterate*2));

    which will give you what you want. and I feel cool.

  8. 03/1/01
    spelling errors, little things, getting ready to release mojo mail 2.4.7 stable

  9. 02/20/01
    totally redid how Mojo Mail deletes emails. we'll see of it works :)

  10. 02/13/01
    general code cleanup,

    Change/Tweak log, for Mojo Mail, 2.4.6 beta

  11. 02/7/01
    fixed a few instances wher i was checking the value of something, and if it wasn't true, would give it a default value. The prolem was, I tried to do this testing for 0 as a valid value and my way went capoot. something like:
            my $foo = 0; 
    
    
            my $bar = $foo || "something else";
    
            print $bar;

    The abovecode would always say 'something else``

    egg on my face.

    this fixed a funky bug on the main page people were having (hopefully it fixed it)

    I also changed how attachments worked in the control panel, There are two ways they can be done, and I'm keeping it that way, since ones bound to not work for some people, and vice versa. I also added some CONFIG.pm things to customize file attachments:

            ######################################################################
            #                                               .: File Attachments :. 
            # To add an attachment to a list message in Mojo Mail form the control panel, 
            # we have to upload it via the web browser. There's two ways we can do this, 
            # one is to save the information in the $FILES directory and then open it up, 
            # attach it, and then delete it, the other involves some magical qualities of
            # CGI.pm and MIME::Lite, probably coupled with your server's /temp file, if 
            # you can use it. 
            # setting $attachment_tempfile to '1' uploads, saves, attaches and then deletes 
            # the file, setting it to '0' does it magicaly. I suggest 1, unles you want to 
            # play around with it. 
    
    
            $attachment_tempfile = 1;
    
            ######################################################################
            # These are the MIME types Mojo Mail understands, the file ending is on 
            # the left, what MIME type it maps to is on the right. feel free to add your own.
    
            %mime_types = ( 
            '.gif'  => 'images/gif', 
            '.jpg'  => 'image/jpg',
            '.png'  => 'image/png',
            '.jpeg' => 'image/jpeg',
            '.pdf'  => 'application/pdf',
            '.pdf'  => 'application/psd',
            '.html' => 'text/html',
            '.txt'  => 'text/plain',
            );
    
            ######################################################################
            # In case nothing up there matches what someone is trying to upload, there's 
            # a default MIME type, for a last ditch guess. Some mail readers are 
            #sophisicated enough to figure out what an attachment is without its MIME
            # type, but don't count on it.

    $default_mime_type = 'text/plain';

  12. 02/05/01
    rewrote the ENTIRE send_email(); mojo.cgi function, in hopes of making it clearer, increase it functionality and lessen its footprint.

    um, its got more functionality that's for sure. Its actually fuckin awesome. it now has two modes, 'Basic' and 'advanced',

    Basic is pretty much the same as what its been, advanced is a whole nother cookie.

    In advanced, you're allowed to reset the 'From', 'Reply-To' and 'Errors-To' to your fancy, you can also set the precedence and priority. I also added attachment support for as many attachments as you think your little MTA can handle.

    And finally I addd the feature of creating a seperate version of your mailing in Text and/or HTML. You can also say if you want this message to be archived or not from the send a list message form. That's alot of stuff.

    With that, i also snuck in support for X-Priority header in MOJO::Mail::Send.pm and also added a select box to Sending Options -> Advanced for a Default Priority.

    In group options, I made it a decision to add the [group name] to the beginning of the header, since someone is bound to ask me how to turn that off.

    I've also been playing around with the idea of usgin CGI.pm to make my checkboxes in the control panel, here's a snippet:

        Tr(
               td({-valign=>'top'},[ 
               (checkbox(-name => 'append_list_name_to_subject', 
                                    -value => 1,
                                    -label=>'',
    
    
                          (($list_info{append_list_name_to_subject} ne "0") ?
    
                       (-checked=>'ON') : 
                       (-checked=>0)),
                      )),
    
                (p(b(a({-href=>'javascript:checklink(3)', -class=>'black'}, 'Add the list name to the subject of group mailings')), br(), 
                  'List messages will be sent out with the list name at the beginning of the message, surrounded by brackets. This,
                   helps subscribers with identifying an e-mail message that originates from your list.'))
                ])
               ),
    
    That's a whole lot cleaner that what I've been doing, if its less code, I don't know, but 
    it looks cool, and that's what counts :) I have never used the EXP ? true : or_this thingy before, 
    I'd like to report that it works! :)

    I added a new function in Guts.pm, called webify_plain_text() -

            sub webify_plain_text{ 
    
    
            my $string = shift;
    
            $string =~ s/>/\&gt;/g;
            $string =~ s/</\&lt;/g;
            $string =~ s/\n\n/<\/p><p>/gi;
            $string =~ s/\n/<br>/gi;
            $string = urlify($string);
            return $string;
    
            }

    kinda makes a string of plain text readable in a browser, cute name eh?

    There was also a bug in the MAIL::Bulkmail module, concerning the date, the fix is:

    ``Go to line 714, this is it:

            ($diffhour = sprintf("%03d", $hour - $ghour)) =~
            s/^0/\+/;

    Change it to this:

            ($diffhour = sprintf("%03d", $diffhour)) =~ s/^0/\+/;

    You're just changing the ``$hour - $ghour'' to ``$diffhour'' and that's it. Bug repaired, and even done correctly this time.``

    I changed that in the version I bundle, and am anxiously awaiting the arrival of the new Mail::Bulkmail :)

  13. 02/1/01
    I added some documentation on tweaking the mojo.cgi script itself, check it out.

    fixed a small bug in a screen like this: http://mojo.skazat.com/cgi-bin/mojo/mojo.cgi?flavor=subscribe&list=mojo_mailers

    where the flavor is set to 'subscribe', there is a list that is real, but there is no email address or pin. The source just ddin't have two hidden HTML field tags:

    <input type=hidden name=flavor value=subscribe> <input type=hidden name=list value=$list>

    fixed a bug dealing with the archives, some people were having trouble deleting archived messages, all I had to do was reset the $| variable where the delete function was called, in mojo.cgi:

            3168 { 
            3169    $|--;
            3170    foreach $entry(@address){ 
            3171            my $exists = $archive -> check_if_entry_exists($entry); 
            3172            $archive -> delete_archive($entry) if($exists >= 1);  
            3173    }
            3174 }
            3175 
            3176 print "Location: $mojo_url?flavor=view_archive\n\n"; 
            3177 
            3178 
            3179 
            3180 }

    really weird.

    fixed a bug in mojo_send.pl when you try to send email to a list that doesn't exist. I noticed that it would email the person trying to send to that list saying 'hey, its not there' and then do it again, and again and...

    the problem was that after it sent the error, it would write a warning using warn() and then die. when the program dies, the mail gets put back into the que to sent again, where it will die...

    the fix was just to put exit() instead of die.

    in mojo_send.pl

            228 $mh -> send(%mailing); 
            229 #and we go!
            230 warn("Mojo Mail $ver ERROR \- Attempt to send a list message to an unknown list ($email_list) by means of mojo_send.pl"); 
            231 exit;