The classic answer would be "Use Net::SMTP" or a similar module instead of cooking up your own.
In this case I hesitate to recommend that module though since last time I checked it was still in need of some improvements to really make it useful (mostly in returning useful error codes to the caller)
As for your code, there's plenty of things you should change:
There's probably a few more things but those would be a good start.
In reply to Re: Sending e-mail problem
by Crackers2
in thread Sending e-mail problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |