While the ssl.trust parameter is sufficient for server such as "smtp.gmail.com", "smtp.yandex.com", which are widely used when sending mail in Java, in C