fixed relative links and add email error sending