lib/resend/mailer.rb in resend-0.14.0 vs lib/resend/mailer.rb in resend-0.15.0

- old
+ new

@@ -42,10 +42,11 @@ to: mail.to, subject: mail.subject } params.merge!(get_addons(mail)) params.merge!(get_headers(mail)) + params.merge!(get_tags(mail)) params[:attachments] = get_attachments(mail) if mail.attachments.present? params.merge!(get_contents(mail)) params end @@ -57,9 +58,22 @@ # @return Hash hash with headers param # def get_headers(mail) params = {} params[:headers] = mail[:headers].unparsed_value if mail[:headers].present? + params + end + + # + # Add tags fields + # + # @param Mail mail Rails Mail object + # + # @return Hash hash with tags param + # + def get_tags(mail) + params = {} + params[:tags] = mail[:tags].unparsed_value if mail[:tags].present? params end # # Add cc, bcc, reply_to fields