fix send/recv the generated pdf file.
add mail send function.