-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Ability to specify delivery status notification (#87)
* Add: Ability to specify delivery status notification when supported by the server. * refactor support for DSN --------- Co-authored-by: Santiago De la Cruz <[email protected]>
- Loading branch information
Showing
4 changed files
with
124 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,7 +231,7 @@ func TestBasic(t *testing.T) { | |
t.Fatalf("AUTH failed: %s", err) | ||
} | ||
|
||
if err := c.rcpt("[email protected]>\r\nDATA\r\nInjected message body\r\n.\r\nQUIT\r\n"); err == nil { | ||
if err := c.rcpt("[email protected]>\r\nDATA\r\nInjected message body\r\n.\r\nQUIT\r\n", ""); err == nil { | ||
t.Fatalf("RCPT should have failed due to a message injection attempt") | ||
} | ||
if err := c.mail("[email protected]>\r\nDATA\r\nAnother injected message body\r\n.\r\nQUIT\r\n"); err == nil { | ||
|
@@ -240,7 +240,7 @@ func TestBasic(t *testing.T) { | |
if err := c.mail("[email protected]"); err != nil { | ||
t.Fatalf("MAIL failed: %s", err) | ||
} | ||
if err := c.rcpt("[email protected]"); err != nil { | ||
if err := c.rcpt("[email protected]", ""); err != nil { | ||
t.Fatalf("RCPT failed: %s", err) | ||
} | ||
msg := `From: [email protected] | ||
|
@@ -1025,8 +1025,9 @@ func init() { | |
} | ||
|
||
// localhostCert is a PEM-encoded TLS cert generated from src/crypto/tls: | ||
// go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com \ | ||
// --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h | ||
// | ||
// go run generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,example.com \ | ||
// --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h | ||
var localhostCert = []byte(` | ||
-----BEGIN CERTIFICATE----- | ||
MIICFDCCAX2gAwIBAgIRAK0xjnaPuNDSreeXb+z+0u4wDQYJKoZIhvcNAQELBQAw | ||
|