There are likely at least two solutions because of the term. I did not exhaustively analyse the function.
f = @(y) exp(-y).*(-1+exp(y)-y)./y.^2;
x=[1 2 3 4 5];
for k = 1:numel(x)
ys(k) = fsolve(@(y) f(y)-x(k), 1);
Experiment to get different results. The fzero function is also an option, however fsolve is more robust.