Understanding a short exact sequence of sheaves associated to a divisor Let $M$ be a complex manifold and $D = \sum_i a_i V_i$ is an effective divisor where $V_i$'s are irreducible analytic hypersurfaces. Let $s_0 \in H^0(M,\mathcal{O}([D]))$ be a holomorphic section of the bundle $\mathcal{O}([D])$ in which $[D]$ is defined to be the image of $D$ under the short exact sequence of cohomology
$$H^0(M,\mathrm{Div}) \to \mathrm{Pic}(M) = H^1(M,\mathcal{O}^{\times})$$
associated to the short exact sequence of sheaves
$$0 \to \mathcal{O}^{\times} \to \mathcal{M}^{\times} \to \mathrm{Div} \to 0$$
where $\mathcal{O}^{\times},\mathcal{M}^{\times}$ are sheaves of holomorphic and meromorphic functions nonzero everywhere, respectively.
If $E$ is any holomorphic vector bundle, write $\mathcal{E}(D)$ for the sheaf of meromorphic functions on $E$ with poles of order $\leq a_i$ along $V_i$. Then, tensoring by $s_0^{-1}$ gives us an identification
$$\mathcal{E}(-D) \overset{\otimes s_0^{-1}}{\rightarrow} \mathcal{O}(E \otimes [-D])$$
In Griffiths & Harris, Principles of Algeraic Geometry, page $139$ the authors assert that

In particular if $D$ is a smooth analytic hypersurface, the sequence of sheaves
$$0 \to \mathcal{O}_M(E \otimes [-D]) \overset{\otimes s_0}{\rightarrow} \mathcal{O}_M(E) \to \mathcal{O}_D(E_{\mid D}) \to 0$$
is exact.

My question is why we need the condition of $D$ to be smooth here? In that case, could someone clarify the above sequence in more details. Any concrete example would be approciate.
 A: This is somehow more subtle than I thought. For simplicity, consider $E$ to be the trivial bundle and $D$ irreducible. The smoothness condition on $D$ appears to guarantee that the sheaf of holomorphic functions on $D$ is well-defined (otherwise, all we could say is just its regular locus). In that case, for each open subset of $M$, consider the sequence
$$0 \to \mathcal{O}(-D)(U) \to \mathcal{O}_M(U) \to (i_*\mathcal{O}_D)(U) \to 0 $$
where $i: D \to M$ is inclusion and $i_*$ is pushforward functor. We can rewrite the above sequence
$$0 \to \mathcal{O}(-D)(U) \to \mathcal{O}_M(U) \to \mathcal{O}_D(U \cap D) \to 0.$$
Since $D$ is effective we hence can write $D = (s_0)$ ($s_0$ is irreducible) in which $s_0$ is holomorphic. The first map in the above sequence is just tensoring with $s_0$, that is, $s \mapsto s \otimes s_0 = ss_0$, the second map is just the restriction $s \mapsto s_{\mid D}$. The map $\mathcal{O}(-D) \to \mathcal{O}_M$ is clearly injective, for the exactness at the middle term, if $s_{\mid D} = 0$ then in a neighborhood of some point $p \in M$, weak nullstellensatz asserts that $s_0$ divides $s$.
For a proof of weak nullstellensatz, look at page $11$ in Griffiths & Harris, Principles of Algebraic Geometry.
A concrete example for the case of Riemann surfaces is already given here.
