-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from wneessen/feature/342_allow-bypass-plain-…
…auth-tls-check Allow unencrypted PLAIN and LOGIN smtp authentication
- Loading branch information
Showing
8 changed files
with
194 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ var ( | |
func ExamplePlainAuth() { | ||
// hostname is used by PlainAuth to validate the TLS certificate. | ||
hostname := "mail.example.com" | ||
auth := smtp.PlainAuth("", "[email protected]", "password", hostname) | ||
auth := smtp.PlainAuth("", "[email protected]", "password", hostname, false) | ||
|
||
err := smtp.SendMail(hostname+":25", auth, from, recipients, msg) | ||
if err != nil { | ||
|
@@ -77,7 +77,7 @@ func ExamplePlainAuth() { | |
|
||
func ExampleSendMail() { | ||
// Set up authentication information. | ||
auth := smtp.PlainAuth("", "[email protected]", "password", "mail.example.com") | ||
auth := smtp.PlainAuth("", "[email protected]", "password", "mail.example.com", false) | ||
|
||
// Connect to the server, authenticate, set the sender and recipient, | ||
// and send the email all in one step. | ||
|
Oops, something went wrong.