Is your Safely Remove … missing?

Is the “Safely Remove Hardware and Eject Media” icon/program missing from your Windows Taskbar?

Try this:

1) Connect a usb device, do you see it now? If yes, you are done.

2) Exit a few taskbar programs (Google Sync and Backup, OneDrive, your printer, etc.) and connect a usb drive.

Do you see the safely remove taskbar icon?

Go to Settings -> Personalization -> Taskbar or Right-Click the Taskbar and go to settings.

Select Which Icons appear in the taskbar.

Toggle off always show all icons in the taskbar.

Toggle on:
Windows Explorer
Safely Remove Hardware and Eject media

No Luck, try here https://www.raymond.cc/blog/restore-missing-or-disappeared-safely-remove-hardware-icon/

It never hurts to try this:
https://garyjohnson53.wordpress.com/2016/03/21/computer-problems/

Advertisements

MediaMonkey Portable Installation

A work in Progress

Actually, a migration from a hard disk installation.  Part 2 of my rethink of my music library. First part is here: The Reorg. The main part that is applicable to doing a portable install is that I moved all of my music files to a usb drive.

The MediaMonkey documentation is at :
http://www.mediamonkey.com/wiki/index.php/Portable_Mediamonkey

I downloaded the latest debug build from here:

http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=54426&sd=d

Click on the MediaMonkey_4.1.19.1859_Debug.exe. Of course, allow the “install” , “change”, elevate, access to private network requests.

Select Portable Installation and specify the drive you want to install it on ( I chose a USB, not the location in the following image)

2017-11-25 (1)

Eventually you get here:

2017-11-25 (2)

2017-11-25 (3)

I did not scan.  I unselected the the location it had by default clicked (Music)

2017-11-25 (4)

2017-11-25 (5)

I let it share, for the moment.

We get to the Monkey Startup and it asks if you want to:

Import Missing file playlist and rating from your other applications; however, MediaMonkey is not one of them.  I skipped this step.

It shows Media Servers for all users?

I changed a few default things:

Turned off : Volume Leveling
Tags and playlists: ID3v2 encoding ascii always.
Media Tree: turned on Classical Music
Search: Turned off Custom and other fields that I don’t care about


Now I want to migrate all of my , auto organize rules, playlists, Milkdrop 2 installation and custom scripts to the new portable install.

I have reviewed the forum posts for a search on “portable” and have narrowed down my first attempt to be based on the following post:

Portable install loses settings.

http://www.mediamonkey.com/forum/viewtopic.php?f=1&t=64297&p=436095&hilit=portable#p436095

Thank you – MediaMonkey Forum User DickSledge

When migrating from a local install to a portable install, do not follow the instructions on “moving to a new computer” that tell you to copy the .ini file. Only copy the .db file and the Metadata Cache folder. Overwriting the .ini file in the portable install will cause that install to look to your hard drive for the database.

It was that easy, I copied:

C:\Users\{USERNAME}\AppData\Roaming\MediaMonkey\MM.DB
To
X:\Portable\MM.DB

and

C:\Users\{USERNAME}\AppData\Roaming\MediaMonkey\MetadataCache\
to
X:\Portable\MetadataCache

X: is the drive I had my music files on and installed portable MediaMonkey to.

BTW: my MetadataCache/Thumbnails directory was empty

I also adjusted skins, options, font size to 150% so I could comfortably read the MM screens.

Next, using my portable install on different computers. I connect it to a laptop, MM automagically adjusts for the new drive.  My scanning and editing {Tools – Options – Auto Organize}  Auto Organize rules still reflect the original drive letter I set them up for.  Example  If genre “Rock” ,

Main Directory I:\Rock\

In my case I alway plan on staging my new files for the library on the USB in a folder called “ToBeOrganized” .  Next thing is to test adding a new file with the Auto Organize rules, to see if it automatically adjusts.  In my case it would make sense to adjust the rules.  How do you code the “Main Directory” so it is not hard coded {I:\Rock} and defaults to the Rock Directory off the root?

2017-11-26

The other Auto Organize rules {Tools – Auto Organize} also reflect the prior installations drive letters.  That and the File Monitor {Tools – Options -Library – File Monitor} also needs to be adjusted.

I renamed this USB drive as music; however, I see it in safely remove drive as “Ultra MT Slim”.  I wonder if I can rename this or if I can rename it, if I do rename it, will it screw up the MM library?


Things of interest

Based upon:
How to export current settings? Where is settings file?
http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=87100&p=432698&hilit=portable#p432698

points to
Retrieve old MM environment?

http://www.mediamonkey.com/forum/viewtopic.php?f=1&t=86940&p=431752&hilit=portable#p431752

The documentation on where things are stored is here:

http://www.mediamonkey.com/support/index.php?/Knowledgebase/Article/View/16/0/modifying-the-mediamonkey-db-and-ini-files

Things worked fine, as along as I was on the original pc.  When I tested it on another machine, I had to update the driveID in the database. The following Third Party Addon can do this: http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=63823

Hopefully, I will not be expanding to much on this:

Disadvantages of portable mode?

http://www.mediamonkey.com/forum/viewtopic.php?f=1&t=87379&p=434148&hilit=portable#p434148


I did my portable install on a “standard” computer config, with a C drive and a D optical (combo DVD /Cd) (it’s been a few years since we had a and b drives, but some things never change!) So my portable install ended up being drive E:  Now when I plug a usb stick in, it goes to drive F.  That’s okay, but it shows the drive E attached.  I attached to to a computer that has c,d,e,f and at G optical drive and it goes to I.  My portable installation showed up as drive H, and it worked.

If when you click on safely remove drives, it gets a little flaky, go to Windows File Explorer and eject the drive.

Wise and Happy

Welcome to My World

The quieter you become, the more you can hear – Ram Dass


All you have to do to be happy, is to be grateful – Martin the dog


We’re born alone, we live alone, we die alone. Only through our love and friendship can we create illusion, for the moment, that we are not alone – Orson Welles

TheWheelsofLifenoahsrejectsgraphicfromwebDSCN2372.sdancingalone


How to Reorganize a Media Monkey Library with Lots of Playlists

A work in progress  MM = MediaMonkey

Tags
“A guide to reorganizing a large MediaMonkey Library”

MediaMonkey Version 4.1.18.1853  Gold
Microsoft Windows 10 Home 10.0.15063

I wrote this guide as I was researching how to reorganize my music library.  Media Monkey has many capabilities and features that make this extremely easy.  It is flexible and powerful.  This guide pulls together the steps I think are prudent when undertaking this task.  First thing, buy a USB drive large twice as large as your collected works.

BTW, my library was in pretty good shape, until I whacked it.  It was either when I was adding some public domain music or when I was creating previews. I never really had to do much with MM, it just worked.  Then I started adding non standard (missing meta data, etc) files to the library.  My original library was segregated into 2 major sections.  Everything I ripped from CD originally was in folders by my own “genre” classification.  The actual genre classification in the metadata was much more diverse than my personal “genre”.   Everything else was added to “Recordings Purchased After 2009 Music”. I used this setup for over 10 years, and never really had to think or worry about it.   I am know going to set up automatic rules that keep my library organized the way I want it.  I hope this guide gives you an idea of some of almost unlimited things you can do with MM.  This post is rather long, mostly because it shows lots of examples and details.  The Short Story (TSS) is, I fixed the crap I added to have 2 of my own “genres”.  Then I set up automatic rules to keep the rest of the library organized by the original genre in the metadata.

My Original library:

D:\
Classical Music
Jazz Music
Miscellaneous Music
My Music
Other Music
Our Music
Pop Music
Recordings Purchase After 2017 Music
Soul Music
Soundtracks Musicals Music

E:\
Christmas Music
Recordings Purchased After 2009 Music

Let us get started!

1) ->File – Create Reports – Click on Statistics

MediaMonkey Music Library Statistics (Edited)

Totals
Type Library Played
Artists 876 491
Albums 722 461
Genres 64 49
Years 70 55
Playlists 118 108
Tracks 6929 1750
Length (h:mm:ss) 502:55:23 125:20:46
File size 155 GB 37.4 GB
Top 10 Genres
Tracks Genre Length File size
2080 Rock 151:35:48 54.1 GB
944 Classical 73:11:44 17.0 GB
899 Jazz 79:15:09 25.0 GB
435 Blues 26:40:33 8.60 GB
367 Soundtrack 21:34:41 6.37 GB
359 Pop 24:45:13 8.13 GB
233 Soul 13:00:03 4.29 GB
195 Variété française 11:41:58 3.82 GB
112 Christmas 4:21:55 1.32 GB
79 PublicDomain 2:33:19 304 MB
….

Generated by MediaMonkey ON Sunday, November 5, 2017 at 9:04:42 AM

Add up the space you see in File Explorer Properties for your Library

D:\ 107.0GB
E:\   48.7GB
=========
155.7 = Library File Size from above. Yeah, they agree!

->Click on Entire Library in the Media Tree

->File – Create Reports – click on the file list format of your choice. Save copies of these reports to compare totals etc after your reorg.

2) Backup your music (and other media) and MM files

How to Backup and Recover a MediaMonkey Library
Updated by Russell Samuels on Nov 30, 2014
http://www.mediamonkey.com/support/index.php?/Knowledgebase/Article/View/63/3/how-to-backup-and-recover-a-mediamonkey-library

I backed up everything under
C:\Users\{USERNAME}\AppData\Roaming\MediaMonkey

CDPlayer.ini
Extensions
Extensions.ini
favicons
MediaMonkey.ini
mediamonkey.m3u8
MediaMonkeyDEc2011.ini
MetadataCache
milkdrop_config.ini
MM.DB
Plugins
Scripts
Skins
xcopy "C:\Users\{USERNAME}\AppData\Roaming\MediaMonkey\*"     "I:\MMDB\*.*" /s /r /y /q /d

I also backup my Milkdrop2 visualizations:  C:\Program Files (x86)\MediaMonkey\Plugins\Milkdrop2.

I also exported all my playlists with a script (Tools – Scripts – Export all Playlists)

Related topics

Modifying the MediaMonkey db and ini files
http://www.mediamonkey.com/support/index.php?/Knowledgebase/Article/View/16

Moving MM to a new computer http://www.mediamonkey.com/wiki/index.php/Moving_MM_to_a_new_computer

I have extensions etc. that I would probably have to reinstall if I moved to a new computer.

http://solair.eunet.rs/~zvezdand/UpdateLocationOfFiles.htm
Update Location of Files in Database
Version 1.4.3
– MediaMonkey Add-on –

3) Fix problems with your library

You can fix issues you find, or you can just ignore them.  This does let you find some things that otherwise, you might have forgotten about. You should probably review the settings you have for you library under:

->Tools – Options – Library

There are a lot of options. I use:

I turn on File Monitor for a folder “To Be Organized” when I add new files to the library.

Library

Tags and Playlists

Metadata lookup

This is one of the most important sections I will discuss later.  I learned the hard way to click on “Delete emptied folders”.

Auto Organize

I turned on Automatically organize file (during scans and edits)  for the reorg.  I turned it off after. I turn it back on when I add new files.

Apperance

Media tree

Search

To edit a song or multiple songs, select them in the media tree, right click ,  -> Properties.  Change the fields you want to change. When doing multiple files, you can change things like genre, but not title.

You can tag things with multiple genres

http://www.mediamonkey.com/forum/viewtopic.php?f=4&t=34372

Review the sections in your media tree under Available Tracks (also Music):

Artist & Album Artist
Album
Files to Edit
Genre

Look for unknown and other anomalies. Missing titles, album names, album artists, genres etc.

I have a few files that are sound clips, previews, funny clips from the internet, public domain music (for videos I post to YouTube etc), ripped from vinyl that have issues. I have files that I just plain screwed up. I scan under Albums and other categories see stuff that’s not right.

Album Excerpts (Sound clips)
Doctor Gary
Doctor Gary (Doctor Gary)
None
Track 10
Ultimate Download Disc and MediaMonkey Guide to Better Sound (ceu) (I screwed these up by using artist instead of album artist when I put thes in my DB)
V-Disc-308A
gj (gj and others)

I also looked at the files in Windows File Explorer.  I navigated to the folders called Unknown (etc.),  I see some of the MM library issues in the files on disk:

I have /Unknown/Unknown.

Back in MM, check the section Files to Edit in your Media Tree under Available Tracks.  Give it some time to work. Review the sections you care about under Files to Edit.  It don’t care about ratings and beats etc, however, some folks really like this capability. Fix the sections you care about.

For  Unsynchronized tags
http://www.mediamonkey.com/wiki/index.php/Synchronizing_Your_Tags

Select all files in this section (Ctrl-A).
Click Tools > Advanced Tag Management > Synchronize tags…

Multiple Artist Albums
If you have an album that has multiple artists, like a Woodstock album, you will get the artists for each track, but, the whole album will have  “Various Artists” for Album Artist.  That is the reason they have that field.
I have 2 albums called Greatest Hits, there were different artists, that confused the multi album process, but otherwise it worked really well. See Optimize Database – Create Multi Artist Albums.

I had instances where Artist / Album / Genre information was missing or inaccurate. I had files I edited and created for ringtones, or for phone messages etc and the stuff I downloaded for Videos (Public Domain).  My genres for these items was all over the place or missing.  I reviewed  the section under “Genres”. When you sort the column for genres by genre, you can get a list of all the empty genres!

I setup new Genres for:

Excerpts = from internet, audacity whatever, if it could be claimed as copyrighted

Genre -excerpts
Album -Album artist
Album artist -Artist

Examples
ItsABeautifulDay,  U2 U2
It’s a drag getting old,  Rolling Stones, Rolling Stones
ClintonLew,  Unknown, Unknown

PublicDomain is for anything that is not copyright protected
Genre – PublicDomain
Artist  – unknown
Album – ShortClips

I fixed the tags for genre (my main organization rule).

Some things have subtle problems.  It will prompt you if a file is read only.  You have to give it some time to work on occasions; however, the Monkey is pretty snappy.  I was unable to write the tags for some .wav and .ogg files. I selected the files, Tools – Convert Format, select “convert replace”, and I rewrote the tags and it worked. The new mp3 files had the tags. Then I did not see a few files, I tried to rescan, but, I had checked , ignore files shorter than 20 kb.

Again, do not forget to update the tags in your files after editing:
Click on Unsynchronized Tags, it will scan your entire library.

->Tools -Advanced Tag Management – Synchronize Tags.

4) Where are you going to store your new Library?

Some of the free and other media managers will try to import music files it sees in the Windows default locations for music under libraries, into their own catalog.

C:\Users\{USERNAME}\Music

I do not want that to happen, so for the time being I am leaving my MM library out of the Windows Music Library.  I am moving my library to a USB drive that I will eventually connect as a NAS and share with all the computers in the house.  There are other options to explore, see “For your consideration” below. If you ever want to include your music in the library structure, it is relatively easy.

How to use libraries in Windows 10

5) Do some Research

Read these topics:

Organizing Files and Folders

http://www.mediamonkey.com/wiki/index.php/WebHelp:Changing_Filenames/4.0

I see collections for Classical Music.  There is a category under properties for Type, and it looks like it is for different types of media, mostly, classical music being the exception. I don’t know if we can set up our own collections. I don’t know how MM determines Type = Classical?.  I am guessing this is used for different file extension media types.

http://www.mediamonkey.com/wiki/index.php/WebHelp:Playback_Rules/4.0

Auto organize

Configuring Directory and Filename Formats

http://www.mediamonkey.com/wiki/index.php/WebHelp:Configuring_Directory_and_File_Formats/4.0

If you click on Tools – Auto-Organize Files and set up a rule there, it will show you the changes that will be made prior to making them. It will show if you will end up with duplicate files (which will overwrite files). You can use it to move to a different folder, different drive or to network storage. When you use MediaMonkey to move/rename files it will update any Playlists within MediaMonkey.  I am trying to set up automatic auto organize rules that will keep my library  organized they way I want.

User Auto-Organize File Masks Examples

http://www.mediamonkey.com/wiki/index.php/User_Auto-Organize_File_Masks_Examples

Auto organize problem:
I saw this in the MM forum.  While running auto organize “It is very possible that Windows explorer is creating Thumbs file and read it so it is locked for moving. Thus Retry works.”

Turn off Thumbs.db

https://www.computerhope.com/issues/ch001061.htm

To disable it, all you need to do is just to enable “Always show icons, never thumbnails” option in Folder Options. To open Folder Options window, the easiest way in Windows 7 and 8 is to press Win key, type “folder options”, and click it. Your image folders will become so plain and boring once you Apply the change.Nov 2, 20

7) Set up Auto Organize

Review this to get some good ideas of what you can do with auto organize rules.

http://www.mediamonkey.com/wiki/index.php/User_Auto-Organize_File_Masks_Examples

To set up auto – organize rules,  Tools – Options – Auto Organize
Double click to edit a rule, or on new, to set up a new Auto-Organize Rule.

2017-11-08

Expand the arrow by Genre and select the genres for this rule (and destination).  In this example I show the last rule for my set, the default.  Click on Configure and you will see the dialog box below.

Note the destination, I:\Default is hardcoded as the first item. Be sure to use album artist so that multi artist albums go to Various , instead of every different artist.

2017-11-26 (1)

I setup destination folders for the main categories (Classical , Jazz).

I have the Classical collection, and I moved it by selecting on the genre and setting up the destination.  Check Type in properties.

Classical\album  A collection

Classical
Check that Classical + Opera etc works

Setup the section Organize these files using the following Directory and Filename format.

The destination folders are in bold.

I use #Track – Title for the file name.
Underneath this for each main category (Classical, Jazz…) is the genres that go with that section

\Jazz\album artist\album

Acid Jazz
Bluegrass
Easy Listening
ethnic
Fusion
Instrumental
International
Jazz
Jazz  + Bebob
Jazz +  Big Band
Jazz + Fusion
Neuvo Flamenco
New Age
Other
Smooth Jazz
World
World Music

\Comedy\album artist\album

comedy

\Christmas\album\

Christmas

Rock\album artist\album

50’s Rock
Alt/Punk
Alternative
Alternative Rock
Blues Rock
Classic Rock
Country
Country-Rock
Electronic
Folk
Folk Rock
Hard Rock
Metal
Rap & Hip-Hop
Rock
Reggae
Pop/Funk
Rock/Pop

Blues\album artist\album

Blues
blues   is it case sensitive ?

Pop\album artist\album

Club
Dance
Dance & DJ
Disco
Funk
Latin
Pop
R&B
Vocal

Soul\album artist\album

soul

Soundtracks\album

Soundtrack
Soundtracks

French\Album artist\Album

Varrite francais

Excepts/Album artist/Album

Excerpts

Traditional\album artist\album

Traditional

Jason\Album artist\album

Jason

Rich\Album artist\album

Rich – Richard Van Deuson

Meditation\Album Artist\album

meditative

Default\album artist\album
None (but lowest precedence)

Last rule I set up has no selection for genre, hopefully the exceptions will always fallout there.

I made sure to do both a quick and complete File Maintain Database and I made another copy of the MediaMonkey database before starting the the auto organize.

I also did a Tools – Export All Playlists

Did you review Files to Edit under Available tracks again?

I selected sub sections of my library, for example D:\Blues, and hit the Insert key, and MM did its magic.  A couple of hours elapsed time to reorganize my library.

At the end, I still had a few things to fix, so I was editing, Ctrl S, synchronizing tags and then hitting Insert. Easy Peasey after you do it for a couple of hours!   I had one album, Bach: Well-Tempered Clavier, Book 1, by Kimiko Ishizaka (free Classical Music) that I had to change the Type from Music to Classical to get in the right place.

For your consideration

Final Thoughts
Exclude your music library from indexing and searching.

When I want to move new files into the library. First I check the tags. Most music that is bought will have valid tags; however, free, Public Domain and other sources may not. If I need to I fix the tags. Then I move the file into my folder “To Be Organized”.

Turn on File Monitor to scan “To Be Organized” at startup
Turn on Auto Organize
After the new stuff has been has been added, I turn them off.

I am going to do another post on Setting up a Portable Media Monkey Installation.

A view of my auto organize rules

2017-11-07 (1)

Multi Album Artists:

2017-11-07

This is screenshot showing playlists, on the right.

2017-11-07 (2)


If you did not select delete empty dirs under auto organize, this might be helpful

Powerscipt to find empty dirs ( run it multiple times as it is not smart)

(gci X:\ -r | ? {$_.PSIsContainer -eq $True}) | ?{$_.GetFileSystemInfos().Count -eq 0} | select FullName

Where X:\ is the drive:\path you want to check for empty directories

I copy the empty dirs and put it in a batch file with RD (remove directory) and /s to do subs, example:
RD “E:\Recordings Purchased After 2009 Music\AAA\the life” \s

Windows RD in a bat file did not like the characters that are above 128 in the code page, so files like this will fail:
E:\Recordings Purchased After 2009 Music\Björk\Homogenic

This looks like a work around, but I have not tried it:

https://stackoverflow.com/questions/9849486/is-it-possible-to-use-extened-ascii-characters-in-a-bat-file

Compare 2 Lists of Names

Compare 2 lists, with different name formats, different file formats (excel, txt, csv, pdf …) etc

  1. convert all files into csv with strings “” encoded
  2. convert to common encoding (usually utf-8 or  Win – 1252)
  3. parse names into nickname, salutation, first, initials or middle, last, suffix **
  4. match on last, then first  do exception list
  5. do fuzzy match on last, first do exception list

I ask people to give me excel files. I give them a little help on how to do that, but a search on importing and converting data into excel usually makes it pretty easy. This also usually gets the encoding into utf-8, however, that is a separate issue.

I load the data from the output of 3 into an sql table and do a number of matches

CREATE TABLE IF NOT EXISTS `TicTack`(
`FName` varchar(50) COLLATE latin1_bin NOT NULL DEFAULT ”,
`LName` varchar(50) COLLATE latin1_bin NOT NULL DEFAULT ”,
`H` ENUM(‘Y’, ‘N’) default ‘N’,
`P` ENUM(‘Y’, ‘N’) default ‘N’,
`K` ENUM(‘Y’, ‘N’) default ‘N’,
`R` ENUM(‘Y’, ‘N’) default ‘N’,
`Flag` TINYINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`LName`,`FName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

algorithmia.com

https://algorithmia.com/algorithms/Nilojyoti/ConferenceNameMatching

The sample code I looked at for the name disambiguation is a classic string compare algorithm.


import Algorithmia
import csv
import sys
from numpy import zeros
from time import time

def apply(input):
venues = Algorithmia.file(“data://Nilojyoti/dblp/dblp_venues.csv”).getString()
wiki_venues = Algorithmia.file(“data://Nilojyoti/dblp/wikipedia_venues.csv”).getString()

vlist = venues.split(‘,\n’)
wlist = wiki_venues.split(‘\n’)
result_list = {}

for venue in vlist:
mindist = sys.maxint
for wikivenue in wlist:
distance = edDistDp(venue, wikivenue.split(‘ – ‘)[0])
if distance < mindist:
mindist = distance
wmatch = wikivenue
result_list[venue]=wmatch
return result_list

def edDistDp(x, y):
“”” Calculate edit distance between sequences x and y using
matrix dynamic programming. Return distance. “””
D = zeros((len(x)+1, len(y)+1), dtype=int)
D[0, 1:] = range(1, len(y)+1)
D[1:, 0] = range(1, len(x)+1)
for i in xrange(1, len(x)+1):
for j in xrange(1, len(y)+1):
delt = 1 if x[i-1] != y[j-1] else 0
D[i, j] = min(D[i-1, j-1]+delt, D[i-1, j]+1, D[i, j-1]+1)
return D[len(x), len(y)]


Example name parser

https://github.com/joshfraser/PHP-Name-Parser

Array (
[nickname] =>
[salutation] => Mr.
[fname] => Anthony
[initials] => R
[lname] => Von Fange
[suffix] => III
)
**The algorithm:**

We start by splitting the full name into separate words. We then do a dictionary lookup on the first and last words to see if they are a common prefix or suffix. Next, we take the middle portion of the string (everything minus the prefix & suffix) and look at everything except the last word of that string. We then loop through each of those words concatenating them together to make up the first name. While we’re doing that, we watch for any indication of a compound last name. It turns out that almost every compound last name starts with 1 of 16 prefixes (Von, Van, Vere, etc). If we see one of those prefixes, we break out of the first name loop and move on to concatenating the last name. We handle the capitalization issue by checking for camel-case before uppercasing the first letter of each word and lowercasing everything else. I wrote special cases for periods and dashes. We also have a couple other special cases, like ignoring words in parentheses all-together.

Check examples.php for the test suite and examples of how various name formats are parsed.

**Possible improvements**

* Handle the “Lname, Fname” format
* Separate the parsing of the name from the normalization & capitalization & make those optional
* Separate the dictionaries from the code to make it easier to do localization
* Add common name libraries to allow for things like gender detection

**Same logic, different languages**

* [Name Parser in Java](https://github.com/gkhays/NameParser)
* [Name Parser in JavaScript](https://github.com/joshfraser/JavaScript-Name-Parser)
* [Name Parser in CSharp](https://github.com/ianlee74/CSharp-Name-Parser)

**Credits & license:**

* Read more about the inspiration for this [PHP Name Parser](http://www.onlineaspect.com/2009/08/17/splitting-names/) library by [Josh Fraser](http://joshfraser.com)
* Special thanks to [Josh Jones](https://github.com/UberNerdBoy), [Timothy Wood](https://github.com/codearachnid), [Michael Waskosky](https://github.com/waskosky), [Eric Celeste](https://github.com/efc), [Josh Houghtelin](https://github.com/jhoughtelin) and [monitaure](https://www.github.com/monitaure) for their contributions. Pull requests are always welcome as long as you don’t break the test suite.
* Released under Apache 2.0 license

** Nickname is important to the convention and association industry ( a big user of this functionality) as nickname is often used on badges identifying attendees instead of first name

A few ways to check email problems

Diagnosing email problems requires you to test possible causes in an iterative fashion. For any given email, there are a complex number of factors at play in sending it and having it successfully delivered.

If you do not know how to copy and paste from web pages, documents and emails, you need to get someone to help you with your problems.  If you do not know how to use the Snipping tool or take a screenshot (if you are not using windows, search for snipping tool on the mac, or your tablet etc), learn how to do it so that you can send an exact copy of any messages etc you receive.

The short story (TSS) is, whoever is having problems sending email, send a plain text msg with no signature to the recipient.  You should get an undeliverable email back.  Another thing to do is to send to a deliberately bad email address (example bademail@baddemailemailaddress.com) so you can compare the undeliverable reports.  If something in your email looks like a forgery, or contains links to bad websites, or contains programs, bat files, .js files as attachments, it is possible that you can get rejected at the server level. Sometimes the error indicated is just a “suggestion” of where to look for your problems.  Try different variations, different senders, different organizations and email address etc and compare your results to see what the problem is.  You might want to run some of the Tools mentioned below. 

I do a quick scan of my spam folders daily and delete / empty them.  It makes tracking this sort of thing easier.  I use 3 different emails for different purposes. A smart thing to do with your email and passwords

Make sure you share your undeliverable “bounce back” emails with whoever is helping you.  Use Dropbox, Google Drive, One Drive, A wordpress blog, forward to a friend ….

Financial institutions, hospitals and many other organizations can have very restrictive email policies. It is not uncommon for them to reject emails with attachments or links, or pictures, or zip files etc. There are a lot of vendors serving the email market, and subtle incompatibilities between systems can arise.
S&*( Happens
If you can’t figure out the problem, start here:

1) Document your email account

How to do you access your email?

Do you use a page you access with a web browser or a program like outlook?
Do you use a service like gmail for business or outlook 365?

example

Email Address : gary@someemailprovider.com
Email Application : Chrome Browser
Log into: http://someemailprovider.com with my user name and password

other examples: Outlook 2007, Apple Mail, I log into Squirrel Mail on my web host, …

2) Both the recipient and sender should make sure they have added all pertinent sender email addresses and domains,  in their safe senders list. This varies by email provider and application  Search for it:

For example
We searched for “office 365 add domain to safe sender”
and found this:
https://support.office.com/en-us/article/Block-or-allow-junk-email-settings-48c9f6f7-2309-4f95-9a4d-de987e880e46

3) Document who you are having problems sending email to:

recipient@otheremailprovider.com

4) How to create a test email

Subject: Test X (where x is the number of the test in the sequence, add 1 for each email sent)

Body:
(repeat from , to)

From: gary@someemailprovider.com
To: recipient@otheremailprovider.com

A note about this test:
examples
    First test after changing safe senders
    Removed email signature
    Sent Text email
    My time is Thu, October 17, 2017 3:06 EDT
    Sent from my phone, tablet, desktop running Windows
    ,IOS....

The person who is having trouble sending email should be doing these tests.

5)
Take a minute to send your test mail.
You notify your recipient tester that it is on the way (send a txt, leave a phone message)

You may have to wait up to an hour for it to wind its way through the systems.

It is helpful to send a plain text email, with no signature or links in the subject or body.  Again, search the help for you email provider / application.  Example “outlook.com send a text email”.  If you can send a plain text email successfully, start by removing and links, pictures, codes etc from the email with a problem.  The problem could also be a link or a picture ( a type of link) in your email signature.

6)
It is important to try and describe accurately what error codes, messages etc are associated with a test email.
The recipient and sender should always check their spam folder.
If the sender gets a message, a returned email, undeliverable etc, they notify the recipient by text or phone.
If the recipient gets a message, they notify the sender.

7) The sender should get an undeliverable message or something indicating error back.

Here is an example of an undeliverable message : Goto to example

If you can’t figure out the problem from the undeliverable report, you can copy and paste all this information into sections of a document to send it to you support person.

Sometimes the error indicated is just a “suggestion” of where to look for your problems.  Try different variations, different senders, different organizations and email address etc and compare your results to see what the problem is.

Sometimes it is useful to both copy and paste the message and to do a screenshot or snippet of what you think is the most pertinent part is.  Look for an easy to read message stating what the error is.

If you do not get an undeliverable message back,  try some of the variations mentioned above.  Have someone else in a different organization, with a different email provider try and send a test text message and see what happens.  And, make sure you have internet access etc before you call in the calvary for help. Computer Problems?


If you do not get any errors, but, do not receive the expected email both sender and recipient forward a email containing the pertinent information above to your tech support teams asking them to please resolve the error.  If you do not have tech support, ask a knowledgeable friend for help.

Is there tech support for your email provider?
Document it so that both email support teams can talk to each other. Please provide contact information and whatever authentication codes etc you need to contact.

Example

Outlook 365
Email Address : gary@someemailprovider.com
account : My Organization

Contact email
Contact Phone
Contact chat

Email is finicky.
When you send an email it goes through a lot of steps, any of which can fail.
The most effective way to test is to test iteratively and make small changes.
But it, can be a simple process, if you follow these steps.


TOOLS

You can run tests to check your email accounts for various problems.  These are free systems and may produce erroneous or miss problems; however, in many cases they can be useful.  Document the results of your tests for whoever is helping you with your email problem.


If you send a lot of marketing or notification emails (bulk email), the first thing you  want to check to see if your address has been blacklisted.  In any case, it does not hurt to check your email address to see if its blacklisted.  The sites that check this come and go frequently, so you might have to search for something like “is my email address blocked”.  Here is an example page that show a way to get started on checking.

http://www.pinpointe.com/blog/how-do-i-know-if-im-on-a-spam-blacklist .There are a lot of lists. It is helpful to know what list the recipient (and senders) email service provider use. These lists are also quite dynamic and occasionally these sites report sites that are not on their current lists or omit sites that are on their actual or live lists.  Also see https://www.mail-tester.com/ below.  It checks you email for known flags etc. Here is another useful article on checking the known blacklists. https://www.rackaid.com/blog/email-blacklists/

The CAN-SPAM Act of 2003 became law on January 1, 2004. According to the FTC, if you violate the law, you could be fined $11,000 for each offense—that’s $11,000 for each email address on your list. ISPs around the country have already successfully sued spammers for millions of dollars under this law. If you send commercial email (generally sales or promotional content), you should familiarize yourself with the requirements of CAN-SPAM.

A few key points of the law include:

Never use deceptive headers, From names, reply-to addresses, or subject lines.
Always provide an unsubscribe link.
The unsubscribe link must work for at least 30 days after sending.
You must include your physical mailing address.


A simple email address checker:

http://mailtester.com/

Enter the address and check

emailtest1

Document your result:
Example:
emailtest2


A more sophisticated checker with lots of options.  https://mxtoolbox.com/

mxtoolbox1

Enter the domain name to check, When it completes, check your report.

In this case, I can hit the Find Problems or do a Blacklist check or SMTP check

mxtoolbox2

After hitting Find Problems

mxtoolbox3.png

The above is an example using my a domain I own called garyjohnsoninfo.info
In this case, the The Certificate has a name mismatch is erroneous. I do not have an https address for this site.

See the show all test button, click it

With some of the test like this, you can get an option to email yourself a report, or save a pdf of the report.  At the very least you can copy and paste this.  Or you can save the page.  Lookup how to save a page for you browser.  Usually it saves and html file and associate folder with information with the page that you can send to your support people.  From the location it saved the page, check for the name it saved it as,

Example

File ..Downloads\garyjohnsoninfo.info Domain Health.html
Folder …Downloads\garyjohnsoninfo.info Domain Health_files


Test you email for some spam checks and other red flags
https://www.mail-tester.com/ 

Follow the instructions.


In addition, learn how to do this:

See if you can do something like “View Message Source”  or “View Full Header ” for your  emails.  Someone will probably ask you to do this.


If you have no one to help you, I am available for $35 dollars an hour.

email gj@garyjohnsoninfo.info


Here is a description of some of the behind the scenes details involved in Authenticating Senders

Email authentication greatly simplifies and automates the process of identifying senders. By quickly verifying a claimed domain name, it is possible to triage the incoming flood of mail. Forgeries and known spamming domains can be rejected at the connection level, without wasting any time on data transfer, or even testing a long list of possible recipient names from the spammer’s dictionary. Reputable senders can be given a pass for an entire session, allowing them to bypass the IP blacklists and statistical filters that always lose some valid messages. The remaining flow can be treated the same as we now treat all email – rigorous filtering, return challenges to the sender, etc. Successful authentication, coupled with a domain-rating system, will reward reputable senders and encourage others to clean up their outgoing mail.

There are a number of methods to authenticate a sender’s domain name ( SPF [2], SenderID [3], CSV [4] , DomainKeys [5], and others). All are very effective in stopping the kind of forgery now prevalent. None exclude the use of other methods, although there is a lot of overlap in basic function, and some incompatibilities. There are small vulnerabilities in each method, and it may be that a combination of two will be required to cover all the cracks. The most widely used will likely be the ones that require the least effort on the part of senders who are reluctant to assume any responsibility for operating public mail servers.

CSV, SPF, and SenderID authenticate just a domain name. DomainKeys uses a Digital Signature to authenticate domain names and the entire content of a message. CSV and SPF can reject a forgery before any data transfer. SenderID must see at least the headers, and DomainKeys must transfer the entire message. CSV is the quickest. DomainKeys is the most thorough. CSV checks only the HELO name at the start of each SMTP session. SPF checks the return address on each message “envelope”. SenderID checks the From address in the headers of each message. Domainkeys can detect any alteration in the headers or body of a message.

CSV, SPF, and SenderID work by checking the IP address of the actual sender {4} against a list of addresses authorized by the alleged sender. If the sender says “HELO this is aol.com sending to you from address 192.168.72.19”, the receiver can query AOL’s records in the Domain Name System ( DNS ), and see if that is indeed an address authorized to send mail on behalf of AOL. So far, it looks like DNS is secure {5}.

DomainKeys also uses DNS to retrieve secure information from the alleged sender, but instead of a list of authorized addresses, the sender provides a public key for his domain. This key can be used to verify the signature on the message, independent of any IP address. Freedom from IP addressing means the message can go by any route, including through a forwarder.

The use of forwarders is common for small domains which prefer not to manage their own mail server, and for individual recipients, who prefer to keep their personal address when they change jobs or ISPs. SPF and SenderID can also work with forwarders, but the extra steps add complexity and some vulnerability to the system (see below). CSV limits its focus to one-hop authentications, and assumes a signature method will be used for end-to-end authentication.

Use of the DNS database to register authentication information for a domain is relatively new. The new information is added to existing DNS records, and queries for this information are handled the same way as any other DNS query. Publishing authentication records in DNS is voluntary, and many domains probably won’t bother. However, any legitimate domain, even those that don’t intend to operate public mail servers, will most likely want to block others from using their name to forge emails. A simple code in their DNS record will tell the world, “Block all mail claiming to be from our domain. We have no public mail servers.”



An Example Undeliverable Message Source

When you see … it means a whole lot of random characters that are of no interest to humans, this is just a sample of what you might see. Lots of things have been deleted, and these vary by both sender and recipient mail system

Received: from CO1NAM03HT023.eop-NAM03.prod.protection.outlook.comReceived: from CO1NAM03HT023.eop-NAM03.prod.protection.outlook.com (10.174.84.19) by BN6PR11MB1297.namprd11.prod.outlook.com with HTTPS

Delivery has failed to these recipients or groups:

bademail@baddemailemailaddress.com (bademail@baddemailemailaddress.com)
Your message couldn’t be delivered. The Domain Name System (DNS) reported that the recipient’s domain does not exist.

Contact the recipient by some other means (by phone, for example) and ask them to tell their email admin that it appears that their domain isn’t properly registered at their domain registrar. Give them the error details shown below. It’s likely that the recipient’s email admin is the only one who can fix this problem.

For more information and tips to fix this issue see this article: http://go.microsoft.com/fwlink/?LinkId=389361.

Diagnostic information for administrators:

Generating server: BY2NAM01HT152.mail.protection.outlook.com
bademail@baddemailemailaddress.com
Remote Server returned ‘550 5.4.310 DNS domain baddemailemailaddress.com does not exist [Message=InfoDomainNonexistent] [LastAttemptedServerName=baddemailemailaddress.com] [BN3NAM01FT021.eop-nam01.prod.protection.outlook.com]’
Original message headers:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=wjaV2sx6vn+eedSgV0V8NhsIOJq8nQN1lbOOd1oWzao=;
….
G+wbQzikCALcd4njjvvM+BEe8UQ+a4/sEXqFTFpGrMwvjJsiwH9g==
Received: from BY2NAM01FT048.eop-nam01.prod.protection.outlook.com
(10.152.68.52) by BY2NAM01HT152.eop-nam01.prod.protection.outlook.com
(10.152.68.74) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.77.10; Tue, 17
Oct 2017 21:08:01 +0000
Received: from BN6PR11MB1297.namprd11.prod.outlook.com (10.152.68.52) by
BY2NAM01FT048.mail.protection.outlook.com (10.152.68.253) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
15.20.77.10 via Frontend Transport; Tue, 17 Oct 2017 21:08:01 +0000
Received: from BN6PR11MB1297.namprd11.prod.outlook.com ([10.173.32.20]) by
BN6PR11MB1297.namprd11.prod.outlook.com ([10.173.32.20]) with mapi id
15.20.0077.022; Tue, 17 Oct 2017 21:08:01 +0000
From: Gary ? Johnson
To: “bademail@baddemailemailaddress.com”
Subject: This is the subject line
Thread-Topic: This is the subject line
Thread-Index: AQHTR4wCXhbZPgww706li0imsCfhvw==
Date: Tue, 17 Oct 2017 21:08:01 +0000
Message-ID:
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: baddemailemailaddress.com; dkim=none (message not
signed) header.d=none;baddemailemailaddress.com; dmarc=none action=none
header.from=hotmail.com;
x-incomingtopheadermarker: OriginalChecksum: …
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [5tZAHpL1A+VBmZ1x15R7VQEN4LHcVqOQ1pBIFXvOmbu5IcPjW77yWM1ZXzfh4hOY]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; ……=
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-ms-office365-filtering-correlation-id: 276019eb-9aba-45c7-f4ae-08d515a32668
x-microsoft-antispam: UriScan:; ….
x-ms-traffictypediagnostic: BY2NAM01HT152:
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test:
….
00095);SRVR:BY2NAM01HT152;
x-forefront-prvs: 04631F8F77
x-forefront-antispam-report: SFV:NSPM;SFS:(7070007)
…….
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative;
boundary=”_000_BN6PR11MB1297F8271A9E0B240A14E942B54C0BN6PR11MB1297namp_”
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2017 21:08:01.0589
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2NAM01HT152