Setting up Mercury SMTP for XAMPP

by Dan Comments are closed

20-xampp-logo-trioAlright so after being up late last night until about midnight I finally found out how to get Mercury Server running for SMTP.  This is very helpful when you are testing on your XAMPP server and you are testing your email functionality and want to see the emails that it is sending out.  Below are the steps to get things working.

Setup DNS for your NIC

  • Go to Start->Network Connections
  • Edit the NIC you are using
  • Double Click TCP/IP settings
  • Manually enter in the DNS servers from your ISP

Disable unneeded Protocols

  • Start Mercury from the Control Panel
  • Go to CONFIGURATION->PROTOCOL MODULES
  • Disable everything except the MERCURYC SMTP RELAY CLIENT and MERCURY SMTP
  • Restart Mercury

Make Changes to Core Module

  • Go to CONFIGURATION->MERCURY CORE MODULE then the GENERAL tab
  • Check to make sure “localhost” is the value of “internet name for this system”
  • Disable all but “send copies of all errors to postmaster”
  • check tab “Local Domains” make sure Localhost is there
  • Close and save

Edit MercuryS SMTP Server

  • Open CONFIGURATION -> MERCURY S SMTP SERVER
  • Choose general tab and enter name as SMTP
  • Make sure port 25 is listed
  • Add 127.0.0.1 to “IP interface to use”
  • Go to Connection Control and add 127.0.0.1 to the list
  • Un-check “do not permit SMTP relaying to non-local mail”
  • Close and Save

Edit MercuryC SMTP Client

  • Open CONFIGURATION -> MERCURYC SMTP CLIENT
  • Enter in external SMTP client (smtp.google.com for example) on port 465 with SSL (or whatever ports are supported)
  • Enter your login name and password to that external SMTP server
  • Close and Save

Edit PHP.INI file to include from line

  • Then go edit your PHP.INI file in XAMPP
  • Under [mail function] add the line “sendmail_from = postmaster@localhost
  • Stop and restart Mercury and Apache

Yup 27 steps is why it took me so long to get this thing working!  The key is that last step to the PHP.INI file without that you will get an awesome syntax error on all your emails.

Automated CPanel Full Backups

by Dan Comments are closed

cpanel_logoLooks like I finally figured out how to automate cpanel backups.  Since most of my sites are all hosted on the same account backup was a sinch with cpanel full backup.  Only issue was that I could not automate the task until now!

First I setup my own local FTP so I had a remote place to put the files.  Then using the script below edited it put in my cpanel variables and then created a cron job to run the file.  The issue wasn’t finding this script, I have had it for a while, the issue was getting the darn thing to work.  Looks like what I was missing was changing the $skin parameter to ‘lp’…thank you Lunar Pages Forum (yes should have looked there a long time ago but didn’t).  Lunar Pages would be my host and looks like they have their own skin for cpanel.  Once I got that in place everything worked perfectly and then I just scheduled the cron job below.

Here is the script cpanel_backup.php

Then schedule the script job via Cron
0 0 * * 1 /usr/bin/env php cpanel_backup.php

Color Scheme Design Picker

by Dan Comments are closed

Color Scheme Designer Screen ShotNot that you could ever have enough websites to help you choose color schemes that actually match here is another one to add to the list!

Color Scheme Designer

MySQL Dump and Load Commands

by Dan Comments are closed

logo-mysqlI have had to do this a lot lately with all the database work I have been doing so I figured I would write this down before I forgot about it.

If you need to restore a database from a .sql file here is the command:

mysql -h hostname -u username -pthepassword databasename < dumpfile.sql

If you need to dump a database to a file (for automated backup purposes) you can use this command:

mysqldump -h hostname -u username -pthepassword databasename > backup-file.sql

These can be very helpful when doing database work

7zip Theme Manager

by Dan Comments are closed

Theme Manager ScreenI have tried playing around with some different file archiving tools and basically have come back to 7Zip again as it seems to be the most functional and useful one I can find.  Plus it is hard to beat the price.  Well if you are worried about the way that yours looks (yes I know I am kinda a skinning crazy person) there is a theme manager out there that you can use to stylize your 7zip application.  I have attached the latest version as well as the website below:


Latest Version: Theme Manager 1.1

Website: 7 Zip Theme Manager


Regular Expressions Find and Replace

by Dan Comments are closed

2009-07-22_085637Dealing with databases and SQL I run across a lot of lists that are usually broken by either excel or line breaks.  Well when you need a quick way to convert that to a single line comma separated list the fastest way to do it is a find and replace on regular expressions.  This can be easily done with Notepad++ or just about any text editor

For example if you had a list like:

1
2
3
4

A find of \r\n and replace with , will give you the output of

1,2,3,4

This can save a whole bunch of time!

Paint.Net Free Photo Editing Software

by Dan Comments are closed

Logo3So I have been using Gimp for a while and wasn’t really happy with it and found it very cumbersome to use especially when I am trying to some very generic photo editing or resizing or whatnot.  Well using my LiberKey on my USB drive has pointed me towards using Paint.Net instead.  I love it, makes editing super fast and easy and the interface is very easy to use.  I would highly suggest using this software it just requires .Net Framework to be installed which isn’t a big deal.  I would highly suggest this software for basic image manipulation.

website: GetPaint.net

Download Portable Version of Paint.net

MySQL – Find and Replace Statement

by Dan Comments are closed

50px-Edit-find-replace.svgThe other day I had to move a blog from one server to another and found out that Wordpress sometimes likes to hard code the server address into things like links and images.  I found this handy little SQL statement you can run to find and replace anything that you need changed:

update [Table] set [Column] = replace([column],’[old text]‘,’new text’);

This can save you a lot of heart ache dealing with moving servers and find out that you have a lot of broken images left after migration.

Landscaping With Life

by Dan Comments are closed

So this weekend we decided to plant some new bushes and flowers and trees in our newly landscaped areas in the backyard.  23 in all and lots of holes to dig and lots of dirt to move it was pretty crazy. Showed up at the plant place with pictures of what we had to work with and then talked with a plant designer for about an hour figuring out what to put where and what would work good with the exposure it receives and worrying about things like acidity levels under the trees and what would grow.  She was amazing helpful as we are sort of plant retarded!  Also we put in a soak line in the front so you just turn that on to water all the flowers.

Everything is in place as you can see below.  If you click on the images, on the bottom it will tell you the name of the plant.  Figured this was the easiest way to remember what we planted since I never remember that stuff.  Chances are we will fill in some gaps with other flowers and whatnot but this was a good start.

Front Yard:

Back Yard:

Change Firefox’s Default Source Editor

by Dan Comments are closed

notepad++logoWell since I am a little partial to using Notepad++ for just about everything these days looks like with a few easy steps you can change the default source editor in Firefox to use Notepad++  It is very simple:

Go to about:config

Search for “view_source.editor.external”
Change this value to “true”

Search for “view_source.editor.path”
Change this to the path of your editor “C:\Program Files\Notepad++\notepad++.exe”