From b08052742020ba7fc4e0c0fb6e129c2b6a9ca9ab Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Thu, 8 Feb 2024 19:16:13 +0530 Subject: [PATCH] fix: smtp golang --- .../email-delivery/smtp/configure-smtp.mdx | 13 +++++++------ .../email-delivery/smtp/configure-smtp.mdx | 8 ++++++++ .../email-delivery/smtp/configure-smtp.mdx | 10 +++++++++- .../email-delivery/smtp/configure-smtp.mdx | 13 +++++++------ .../email-delivery/smtp/configure-smtp.mdx | 8 ++++++++ 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx b/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx index f8fd518ff..5c4080074 100644 --- a/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx +++ b/v2/emailpassword/email-delivery/smtp/configure-smtp.mdx @@ -82,7 +82,7 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" - "crypto/tls" + "crypto/tls" ) func main() { @@ -98,11 +98,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, - // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS - // if not provided, the SDK will use a default config - TLSConfig: &tls.Config{ - // ... - }, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/passwordless/email-delivery/smtp/configure-smtp.mdx b/v2/passwordless/email-delivery/smtp/configure-smtp.mdx index cb3877a80..8db2391cd 100644 --- a/v2/passwordless/email-delivery/smtp/configure-smtp.mdx +++ b/v2/passwordless/email-delivery/smtp/configure-smtp.mdx @@ -62,6 +62,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/passwordless" "github.com/supertokens/supertokens-golang/recipe/passwordless/plessmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -83,6 +85,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, }, }), }, diff --git a/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx b/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx index bab06d9ff..22f9c0c16 100644 --- a/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdparty/email-delivery/smtp/configure-smtp.mdx @@ -70,6 +70,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification" "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -81,10 +83,16 @@ func main() { Name: "...", Email: "...", }, - Port: 465, + Port: 456, Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx b/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx index 44714b4ba..e362a328e 100644 --- a/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdpartyemailpassword/email-delivery/smtp/configure-smtp.mdx @@ -82,7 +82,7 @@ import ( "github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels" "github.com/supertokens/supertokens-golang/supertokens" - "crypto/tls" + "crypto/tls" ) func main() { @@ -98,11 +98,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, - // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS - // if not provided, the SDK will use a default config - TLSConfig: &tls.Config{ - // ... - }, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end diff --git a/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx b/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx index db672e6e9..263f157e2 100644 --- a/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx +++ b/v2/thirdpartypasswordless/email-delivery/smtp/configure-smtp.mdx @@ -78,6 +78,8 @@ import ( "github.com/supertokens/supertokens-golang/recipe/thirdpartypasswordless" "github.com/supertokens/supertokens-golang/recipe/thirdpartypasswordless/tplmodels" "github.com/supertokens/supertokens-golang/supertokens" + + "crypto/tls" ) func main() { @@ -93,6 +95,12 @@ func main() { Username: &smtpUsername, // this is optional. In case not given, from.email will be used Password: "...", Secure: false, + + // this is optional. TLS config is used if Secure is set to true, or server supports STARTTLS + // if not provided, the SDK will use a default config + TLSConfig: &tls.Config{ + // ... + }, } // highlight-end