in reply to What's wrong with my forwarder?
I think the problem is you're printing a single "." on a line in one of your datasend()s. That's SMTP protocol for "end of message", so by the time you call dataend(), the SMTP server thinks the message has already finished.