Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/support/custom_template_email.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CustomTemplateEmail < Carbon::Email
@headers = {} of String => String,
@subject = "subject",
@text_body : String? = nil,
@html_body : String? = nil
@html_body : String? = nil,
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/support/fake_email.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FakeEmail < Carbon::Email
@headers = {} of String => String,
@subject = "subject",
@text_body : String? = nil,
@html_body : String? = nil
@html_body : String? = nil,
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/support/fake_email_with_attachments.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FakeEmailWithAttachments < Carbon::Email
@headers = {} of String => String,
@subject = "subject",
@text_body : String? = nil,
@html_body : String? = nil
@html_body : String? = nil,
)
end

Expand Down
1 change: 1 addition & 0 deletions src/carbon_sendgrid_adapter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Carbon::SendGridAdapter < Carbon::Adapter
"asm" => {"group_id" => 0, "groups_to_display" => [] of Int32},
"mail_settings" => {sandbox_mode: {enable: sandbox?}},
"attachments" => attachments,
"send_at" => email.send_at,
}.compact

# If Sendgrid sees an empty attachments array, it'll return an error
Expand Down
7 changes: 7 additions & 0 deletions src/carbon_sendgrid_extensions.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ module Carbon::SendGridExtensions
def asm
nil
end

# Tell Sendgrid to send the email at this time.
# Value should be a unix timestamp integer
# https://www.twilio.com/docs/sendgrid/for-developers/sending-email/personalizations
def send_at
nil
end
end

class Carbon::Email
Expand Down
Loading