Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body text goes missing when using add_file #1539

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balvig
Copy link

@balvig balvig commented Dec 13, 2022

This is just a failing test so far, as I'm not sure if this is actually a problem or I'm just doing something wrong! 🙇

It seems that since v 2.8, using add_file causes the body text to go missing:

m = Mail.new
m.body = "Body text"
m.body.to_s # => "Body text"

m.add_file(:filename => "attachment.data", :content => "a")
m.body.to_s # => ""

Am happy to try and fleshing this out to a fix, but wanted to first double check whether this is indeed expected behavior of not.

The behavior does not seem to occur in 2.7.

@balvig balvig marked this pull request as ready for review December 13, 2022 14:46
balvig added a commit to ActiveCampaign/postmark-gem that referenced this pull request Dec 13, 2022
## What

Locks the `mail` dependency to `~> 2.7.0`

## Why

`v 2.8.0` of the mail gem is causing [tests to
fail](https://app.circleci.com/pipelines/github/ActiveCampaign/postmark-gem/115/workflows/98f981da-bff4-4abb-b0ad-eaeb8045e873).

Currently investigating here mikel/mail#1539,
but since it's just a development dependency we can lock the version to
the CI back to green for now.
@sebbASF
Copy link
Collaborator

sebbASF commented Dec 14, 2022

It’s rather odd that the truffleruby head build succeeded.

balvig added a commit to ActiveCampaign/postmark-gem that referenced this pull request Oct 11, 2023
## What

Alternate workaround to #135 and #143.

## Why

While there still seems to be an [issue with `add_mail` "clearing"
`body`,](mikel/mail#1539) instead of locking the
gem for all ruby version and making it difficult to test newer ones, we
can limit the version restrictions to legacy version and use this
workaround of flipping the order for Ruby 2.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants