domodwyer / mailyak

An elegant MIME/SMTP email library with support for attachments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is there any example for tls connect ?

nevernet opened this issue · comments

Hi, all

is there any example for tls connect ?

Thank you

commented

Hi @nevernet,

If your server supports the STARTTLS extension (RFC-3207) then you're good to go:

mail := New("mail.host.com:443", smtp.PlainAuth("", "user", "pass", "mail.host.com"))

Note some servers only support TLS on certain ports.

I've confirmed this is working as designed using Amazon's SES SMTP Interface which requires TLS.