I\'m creating a menu item in Google Sheets that will list a work directory and pull the email address for that user, to be later used to process employee records within Goog
When you create a menu item with
.addItem('Nathaniel MacIver', menuItem2('nm@emailaddress.com'))
the function menuItem2 is called with the parameter 'nm@emailaddress.com'. This results in the alert that you see. The return value of the function is undefined (as you don't return anything from it). So you end up with the same menu item as if it was
.addItem('Nathaniel MacIver', undefined)
which clearly isn't going to do anything.
The method addItem takes only a function name, it does not allow for passing parameters to that function. To do what you want, you'll need separate functions for each person, each with an email hardcoded inside that function.