03.06.2022, 07:28
STARTTLS uses a different port - most often 587. While standard SSL/TLS uses 465. Also check what the email function returns, it might tell you where the error is:
Code:
res, err = mail(...)
log(res, err)