This has been driving me spare for the last week, and I feel pretty bad for not being able to get a solution because (at least on the face of it) it's a pretty simple equation.
I have the following reaction diffusion equation: $$\frac{\partial M}{\partial t}=d\frac{\partial^2 M}{\partial x^2}-gM$$ With: $$\frac{\partial M}{\partial x}(0,t)=-h, \quad M(1,t)=0, \quad M(x,0)=0$$ $$0 \le x \le 1, \quad t>0, \quad d,g,h \ge 0$$
I'm searching for an analytical solution. I've tried separation of variables, I've tried basic transformations, I've looked in books, but I just can't find a solution that satisfies the BCs. I've solved it numerically and (for the values I tried, relating to the larger problem I'm working on) it's a pretty boring curve, so I don't expect there to be anything crazy going on in a solution.
Please, someone put me out of my misery! I'm fully expecting that I'm missing something obvious or making a ridiculous mistake, but I'd like to see what people answer before I put my working up here.

The boundary condition at $x=0$ is not homogeneous. You cannot apply separation of variables directly. Let $M(x,t)=v(x,t)+\phi(x)$, where $\phi(x)$ is the steady state, that is, the unique solution of $$ d\,\phi''-g\,\phi=0,\quad\phi'(0)=-h,\quad \phi(1)=0. $$ Then $v$ satisfies the equation $$ v_t=d\,v_{xx}-g\,v $$ with boundary condition $v_x(0,t)=0$, $v(1,t)=0$ and initial value $v(x,0)=-\phi(x)$. Finally, let $v=e^{-gt}w$. Then $w$ satisfies the equation $$ w_t=d\,w_{xx} $$ with boundary condition $w_x(0,t)=0$, $w(1,t)=0$ and initial value $w(x,0)=-\phi(x)$. You can now use separation of variables to find $w$ and $$ M=e^{-gt}\,w+\phi. $$ As $t\to\infty$, $M$ approaches the steady state solution, as it should be.