email

Local Mail Server During Development

Snippet

Sometimes, you need to send email during software development, and you need to be able to receive the email, even if the addresses are fake (say, to @example.org) and what have you.

The node package, fake-smtp-server is a handy tool for providing a server to receive the mail, and an interface for viewing the email that was sent.

https://www.npmjs.com/package/fake-smtp-server

Install globally on a system with:

npm install -g fake-smtp-server

Start it up:

fake-smtp-server

If you want to have it on port 25 as most mail servers expect, run as root:

sudo fake-smtp-server -s 25

View the emails received (by default) at

http://localhost:1080

You can change that port, too:

sudo fake-smtp-server -h 8888

A few other configurations, and an API. Great little tool.

Usage:
  fake-smtp-server [OPTIONS] [ARGS]
 
Options:
  -s, --smtp-port [NUMBER] SMTP port to listen on (Default is 1025)
      --smtp-ip [IP]       IP Address to bind SMTP service to (Default is 0.0.0.0)
  -h, --http-port [NUMBER] HTTP port to listen on (Default is 1080)
      --http-ip [IP]       IP Address to bind HTTP service to (Default is 0.0.0.0)
  -w, --whitelist STRING   Only accept e-mails from these adresses. Accepts
                           multiple e-mails comma-separated
  -m, --max [NUMBER]       Max number of e-mails to keep (Default is 100)
  -a, --auth STRING        Enable Authentication
      --headers            Enable headers in responses
  -k, --no-color           Omit color from output
      --debug              Show debug information

View mail in queue

Snippet

Turn email addresses into fake addresses for testing databases

Snippet

When you have live data in a testing database, you don't want to trigger emails that go to your users. In the case where you need the rest of the data, and need valid email addresses, append .example.com to turn current valid email addresses into syntactically valid email addresses, but not emailable addresses.

UPDATE `orders` SET email = CONCAT(email, '.example.com') WHERE email NOT LIKE '%example.com';
 
-- alternately, to undo this change, use replace
 
UPDATE `orders` SET email = REPLACE(email, '.example.com', '');

Uh... no?

Blog

I received this question, and only this question, in a message from my contact form today.

Are you the same Tom Hudson who wrote "Lake Elsinore Valley"?

How does one search for "Tom Hudson" and end up on a site that belongs to "Kitt Hodsden?"

I ask you.

Saddest day of ever

Blog

Today is the saddest day of ever.

Today is the first day I have received an unsolicited commercial spam email to my main email address. I use throw away email addresses for my commercial dealings, meaning I know when some company has a virus on their systems or has sold my email address. It's not hard to figure out when the address kittsprint shows up on electronic goods emails that Sprint sold my address, or when kittameritrade shows up in a spam email that Ameritrade has a virus on their systems.

This second one actually happened, with kittameritrade being my second email address I used with Ameritrade. The first time I reported the virus on their systems, they insisted the problem wasn't within their systems, it was within mine. I asked them to switch email addresses, and four months later the new email address was getting financial spam to it.

After getting the run around from Ameritrade again with the virus in their systems, I reported their breach of privacy policy and leak of personal information to the SEC. Now THAT got Ameritrade moving.

I couldn't help but think, "You know, people, not everyone uses Microsoft products, and that's a good thing. Homogeny is a cracker's dream, especially when all of the products are flawed."

I have to admit, my run lasted a long, long time. I've used my personal email address for about eight years without spam to it, and without any email spam filters on it. In this day and age, that's pretty good.

I guess it's time to switch to one of the other five top level domains I have for my last name. Since hodsden.org is being spammed, how does hodsden.com sound?

Of course...

Blog

Emails like this one from Beth are wonderful, too.

I heart kitt.

That is all

B

Lori cracks me up

Blog

Drunken emails like this crack me up.

Yaaaaaaaaaay for Kitt! Yaaaaaaaaaaaaaaaaaaaaaaaaay!

You ar ea rock star.

owaoiojioeowoooooooooooooooo
woooooooooooo
woo wooooooooooooo
that's a train sound
wooo woooooooooooo
I am watching The Office, last season, woooooooo.
JJ is gone at his bachelor party.
I am home and drunk on wine.
Yum
I heart you Kitt.

yaaaaaaaaaaay for kitt!!!!!!!!!!!!!

-L