A flavour-tagged time-dependent angular analysis of $B^0_sto J/psiphi$ decays is presented where the $J/psi$ meson is reconstructed through its decay to an $e^+e^-$ pair. The analysis uses a sample of $pp$ collision data recorded with the LHCb experiment at centre-of-mass energies of 7 and 8 TeV, corresponding to an integrated luminosity of 3 fb$^{-1}$. The $CP$-violating phase and lifetime parameters of the $B^0_s$ system are measured to be $phi_s=0.00pm0.28pm0.07$ rad, $DeltaGamma_s=0.115pm0.045pm0.011$ ps$^{-1}$ and $Gamma_s=0.608pm0.018pm0.012$ ps$^{-1}$ where the first uncertainty is statistical and the second systematic. This is the first time that $CP$-violating parameters are measured in the $B^0_sto J/psiphi$ decay with an $e^+e^-$ pair in the final state. The results are consistent with previous measurements in other channels and with the Standard Model predictions.