Net::SMTP via PERL is not working in few cases

We are getting some special scenarios where Net::SMTP is not working for some mails.

we are sending a similar kind of data via mails but some of the mails are not received.

After checking the Net::SMTP in debug mode we found below difference:

Good One - (Mail sent properlly)
---
-----
Net::SMTP=GLOB(0x1bfcd34)>>>
Net::SMTP=GLOB(0x1bfcd34)>>> </body></html>
Net::SMTP=GLOB(0x1bfcd34)>>> .
Net::SMTP=GLOB(0x1bfcd34)<<< 250 2.0.0 nAD6WZah001063 Message accepted for delivery
Net::SMTP=GLOB(0x1bfcd34)>>> QUIT
Net::SMTP=GLOB(0x1bfcd34)<<< 221 2.0.0 XXX.yyy.com closing connection

Failed One - (Mail not recieved )
-----
----------
Net::SMTP=GLOB(0x1bfccb4)>>>
Net::SMTP=GLOB(0x1bfccb4)>>> </body></html>
Net::SMTP=GLOB(0x1bfccb4)>>> .
Net::SMTP=GLOB(0x1bfccb4)<<< 250 OK: data received
Net::SMTP=GLOB(0x1bfccb4)>>> QUIT
Net::SMTP=GLOB(0x1bfccb4)<<< 221 2.0.0 XXX.YYY.com closing connection

Can some one please help me undestanding this issue
Thanks in advance