diff --git a/example/example_test.go b/example/example_test.go index bd67958..3998cd0 100644 --- a/example/example_test.go +++ b/example/example_test.go @@ -45,13 +45,13 @@ func Example_send() { // send the email err := raweml.Send( raweml.Email{ - From: "NO REPLAY EMAIL ACCOUNT ", - Recipients: raweml.NewRecipients("customer@example.com", "", ""), + From: "NO REPLAY EMAIL ACCOUNT ", + Recipients: raweml.NewRecipients("bjankulovski@mediaresources.com", "boseca@gmail.com", ""), Subject: "Simple Test", HTMLBody: "

Amazon SES Test Email (AWS SDK for Go)

" + "" + "
Time: " + time.Now().Format("2006-01-02 15:04:05") + "

", - Attachments: []raweml.Attachment{{Name: "Mars.png", ContentID: "1001"}}, //, ContentType: "image/png; name=\"Mars.png\""}}, + Attachments: []raweml.Attachment{{Name: "Mars.png", FileName: "Mars.png", ContentID: "1001"}}, //, ContentType: "image/png; name=\"Mars.png\""}}, AwsRegion: "us-east-1", }) @@ -88,8 +88,8 @@ func Example_send_advanced() { // build the email email := raweml.Email{ - From: "NO REPLAY EMAIL ACCOUNT ", - Recipients: raweml.NewRecipients("customer@example.com", "", ""), + From: "NO REPLAY EMAIL ACCOUNT ", + Recipients: raweml.NewRecipients("bjankulovski@mediaresources.com", "boseca@gmail.com", ""), Feedback: "", // "AWS Email Feedback ", Subject: subject, TextBody: "This email was sent with Amazon SES using the AWS SDK for Go.", @@ -100,7 +100,7 @@ func Example_send_advanced() { "
" + "

Time: " + time.Now().Format("2006-01-02 15:04:05") + "

", CharSet: "UTF-8", - Attachments: []raweml.Attachment{{Name: "Mars.png", ContentID: "1001", Data: file}}, //, ContentType: "image/png; name=\"Mars.png\""}}, + Attachments: []raweml.Attachment{{Name: "Mars.png", FileName: "Mars.png", ContentID: "1001", Data: file}}, //, ContentType: "image/png; name=\"Mars.png\""}}, Headers: nil, Priority: raweml.PriorityHigh, Topic: topic, // when set, "Thread-Topic", "Thread-Index" and "References" header attributes will be set diff --git a/raweml_test.go b/raweml_test.go index 9936083..240d019 100644 --- a/raweml_test.go +++ b/raweml_test.go @@ -59,7 +59,7 @@ func TestRaweml(t *testing.T) { TextBody: "Amazon SES Test Email (AWS SDK for Go)", HTMLBody: "

Amazon SES Test Email (AWS SDK for Go)

", Topic: "Hello world", - Attachments: []Attachment{{Name: "example/Mars.png", ContentID: "1001"}}, + Attachments: []Attachment{{Name: "Mars.png", FileName: "example/Mars.png", ContentID: "1001"}}, AwsRegion: "us-east-1", } eml.SetHeader("X-something", "test")