feat: SendRaw
This commit is contained in:
@@ -45,7 +45,7 @@ func TestNewConfig_MissingEnvFile(t *testing.T) {
|
||||
func TestMockSendEmail(t *testing.T) {
|
||||
service := NewMockMailService(func(params ...interface{}) {})
|
||||
|
||||
emailData := EmailMessage{
|
||||
emailData := MessageWithAttachments{
|
||||
To: "test@example.com",
|
||||
Subject: "Test Email",
|
||||
Body: "This is a test email.",
|
||||
@@ -68,7 +68,7 @@ func TestNewInsecure(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("TestSendEmail", func(t *testing.T) {
|
||||
data := EmailMessage{
|
||||
data := MessageWithAttachments{
|
||||
To: cfg.MailTo,
|
||||
Subject: "Mail Sender",
|
||||
Body: "Hello this is a test email",
|
||||
@@ -89,7 +89,7 @@ func TestNewInsecure(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer reader3.Close()
|
||||
|
||||
data := EmailMessage{
|
||||
data := MessageWithAttachments{
|
||||
To: cfg.MailTo,
|
||||
Subject: "Mail Sender",
|
||||
Body: "Hello this is a test email",
|
||||
@@ -120,7 +120,7 @@ func TestNewInsecure(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("TestSendEmail_InvalidRecipient", func(t *testing.T) {
|
||||
data := EmailMessage{
|
||||
data := MessageWithAttachments{
|
||||
To: "invalid_email",
|
||||
Subject: "Test Email",
|
||||
Body: "This is a test email.",
|
||||
@@ -137,7 +137,7 @@ func TestNewInsecure(t *testing.T) {
|
||||
Port: cfg.MailPort,
|
||||
From: cfg.MailFrom,
|
||||
})
|
||||
data := EmailMessage{
|
||||
data := MessageWithAttachments{
|
||||
To: cfg.MailTo,
|
||||
Subject: "Test Email",
|
||||
Body: "This is a test email.",
|
||||
@@ -172,7 +172,7 @@ func TestSecure(t *testing.T) {
|
||||
}
|
||||
emailService.dial = mockDialFn
|
||||
|
||||
data := EmailMessage{
|
||||
data := MessageWithAttachments{
|
||||
To: cfg.MailTo,
|
||||
Subject: "Mail Sender",
|
||||
Body: "Hello this is a test email",
|
||||
|
||||
Reference in New Issue
Block a user