Sri Lankan president emails resignation, official says