Skip to content

Commit

Permalink
fix: smtp golang
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Feb 8, 2024
1 parent 89e7d00 commit b080527
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 13 deletions.
13 changes: 7 additions & 6 deletions v2/emailpassword/email-delivery/smtp/configure-smtp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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

Expand Down
8 changes: 8 additions & 0 deletions v2/passwordless/email-delivery/smtp/configure-smtp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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{
// ...
},
},
}),
},
Expand Down
10 changes: 9 additions & 1 deletion v2/thirdparty/email-delivery/smtp/configure-smtp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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

Expand Down

0 comments on commit b080527

Please sign in to comment.