hostname_check fails in smtp tls handshake

hi ,
I am using Smtp for otp verification , but getting Error sataing that

=NOTICE REPORT==== 23-Apr-2025::12:01:20.298639 ===
TLS client: In state wait_cert at ssl_handshake.erl:2113 generated CLIENT ALERT: Fatal - Handshake Failure
 - {bad_cert,hostname_check_failed}
Failed to send email: {temporary_failure,"40.104.77.82",tls_failed}
 Reason: retries_exceeded

The certificate might not include the correct domain name.
Please let me know how can i resolve this .

I can’t help you on this particular error, but if you don’t need the hostname check you should be able to disable it by passing verify_none as an ssl option.