@alcinnz That error is from the mailserver you’re sending to rather than your script. It’s unhappy that you don’t have a From: header, by the look of it.
I’d guess you need to explicitly add the from header, same as you would any other. I don’t think smtp.send will add it for you.