Emails sent to customers get bounced sometimes. This causes issues like sharing invoices or login when OTP is generated and sent to email.
1. If you have enabled DMARC reject policy then there are chances for emails to bounce.
You can verify it here: https://mxtoolbox.com/SuperTool.aspx
Generally, it is the security team that might have enabled the DMARC reject policy for security purposes. This can not be changed in Chargebee - this is outside the scope of Chargebee and the best way to resolve this is to check with your internal security team.
If you do not want to disable this due to security reasons, then you can use any other SMTP server apart from Mailgun that supports attachment.
If you have enabled DMARC for your domain then you will need to use your own SMTP server where you have verified DKIM and SPF records for your domain with respect to the SMTP provider. Here's more on this.
2. SMTP server - UnknownHostException: or SocketTimeoutException:Read timed out
Please check if you have set the correct credentials and also if your email is part of the bounce list within your SMTP server.