Mailer Upgrade

From MontegoScriptsWiki
Jump to: navigation, search

Home>Mailer>Upgrade Instructions

Overview

There has only been two releases so far, so these instructions are written specifically for an upgrade from TegoNuke™ Mailer version 1.0.0 to 1.1.0. It is our intent that database changes will only be implemented between major releases (so from 1.0 to 1.1 for example - this release) and the TegoNuke™ Mailer is written such that it will handle the database table upgrade automatically the first time the new script is executed.

Major releases could also include some re-factoring of the underlying scripts, so more upgrade work needs to be done, which may also incur a slight outage to your site but this will be kept to a minimum. All attempts are made so that previous Core File Edits will work with newer versions of the TegoNuke™ Mailer, however, these edits, as always, should still be compared with your implemented edits and updated as new mailer versions are deployed just to avoid any unforeseen site impacts.

As additional versions of the TegoNuke™ Mailer are released, new steps will be added to this Wiki page to help guide you through your upgrade. In addition, if your site has NukeSentinel™ installed (the latest version is ALWAYS best!), you may want to temporarily disable your site during the Mailer File Upgrade step. See our FAQ on Disabling Site Temporarily Using NukeSentinel for how to do this.

Backup, Backup, Backup

Always, always, always back up your site files and database. Most web hosts provide some form of control panel that you can log into and perform common administration tasks such as submitting a full site backup, files and databases. It is always good practice to produce these back-ups so that you may quickly restore back to your previous condition in case you mess something up.

Another helpful tip that we learned rather quickly is to create a development/test environment right on your local PC/laptop to mirror that of your production site. There are entire WAMP/LAMP environments available today, such as XAMPP from Apache Friends, which make this incredibly easy. This type of set up gives you an opportunity to test all of your site updates off-line prior to going live. Call it a dry-run, trial-run, or just being smart, whatever you like.

Upgrade Steps

Step 1: Extract Mailer Files and Deploy

Do the following:

  1. Extract the distribution archive to your local PC
  2. On your target site to deploy, it would be best to first remove the following directories/files (if you were planning on disabling your site via NukeSentinel™, now would be the time to do it if you have not done so already):
    • Remove directory includes/tegonuke/mailer/Swift
    • Remove file includes/tegonuke/mailer/Swift.php
    • Remove file includes/tegonuke/mailer/EasySwift.php
  3. Now copy all of the files that are under the html directory to the root of your *nuke site (i.e., to where mainfile.php resides) so:
html/       ---> PHP-Nuke_root/

You should now be able to upgrade your database table and configure your new TegoNuke™ Mailer settings if you so desire.

NOTE: at this point in time, if you are upgrading from a previous installation of the TegoNuke™ Mailer and you have your PHP settings such that PHP errors are displayed, you could see some errors related to the TNML_IS_ACTIVE constant. Even if you have $display_errors set to false in config.php, you may still see a PHP error. You should NEVER run a production site with PHP errors turned on to where they get displayed. Once you complete the core file edits for mainfile.php, these PHP errors will go away.

Step 2: Upgrade Tables and Configuration

Make sure the script includes/tegonuke/mailer/mailer.php has the following switch set to "true" like this:

define('TNML_CHECK_TABLE', true);

If it is not, change it and re-upload it.

Mailer Administration Control Panel Graphic

Now log into the Administration Control Panel (i.e., admin.php) and click on the "TegoNuke Mailer" icon/link (shown to the right); the mailer configuration table will be upgraded automatically with all the new default settings basically disabled (so no impact to current site operations) until the core file edits are complete and you are ready to test.

Once the new Mailer code is executed once with this set to true, the table(s) are updated and you may change this line to false and the table check will no longer be executed (i.e., saves a few database calls).

Step 3: Configure New Settings

New options for method SMTP were added so you might want to review those settings and make any desired changes. Use the provided pop-up help icons to see helpful hints for each configuration setting or click on the above link to a page with more specific details around configuration. The settings for PHP Mail() and Sendmail have not changed since the initial 1.0.0 release (and probably never will).

Step 4: Review and Revise Core File Edits

If you recall from your initial installation of the TegoNuke™ Mailer, certain core *nuke files needed to be modified in order to have the email sends go through the Mailer rather than the standard PHP mail() function. The most important core file edit to make would be for the mainfile.php script. I would review and update that one FIRST and re-upload it. This will ensure proper site functioning right away. If you had used NukeSentinel™ to disable your site, you could reverse that now, after mainfile.php is updated.

You should now compare each of the scripts and edits on our Mailer Core File Edits page to your current script files and make any necessary adjustments that you see. The edits were relatively minor in nature (except mainfile.php) and essentially were about simply changing from this one line of code:

if (defined('TNML_IS_ACTIVE')) {

To this code:

if (TNML_IS_ACTIVE) {

That is pretty much it for core file edit differences!

Step 5: You Are Done: Almost

It costs money to run a web site and to host the downloads, these instructions and to provide a means for community support. Don't kid yourself: while Open Source is "free" to YOU, it is NOT free to the ones providing it. Besides, why not show your appreciation and give the author(s) of Open Source scripts the little bit of motivation they need to continue to plug on and produce other scripts that you may need/want in the future.

Please support your starving Open Source programmer by making a small, but very much appreciated, donation!  :-) Just follow the "Make Donation" link or through the block on the Home Page of http://montegoscripts.com. Thank you!

Personal tools