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

Allow String Attachments. Referencing SparkPost/wordpress-sparkpost#132 #133

Merged
merged 2 commits into from
Oct 31, 2017

Conversation

d4mation
Copy link
Contributor

This allows Attachments that have been added using PHPMailer's addStringAttachment() method to be sent properly via the HTTP API.

An example can be seen in #132.

{
return file_get_contents($path);
if ( file_exists( $data ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Do you think is_file is more appropriate, in terms of how it sounds at least. Also please add a comment of explaining why we're doing it so next person understands it quickly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good now 👍

Good call on is_file(). Didn't realize file_exists() would return true on directories.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, I'll test it in next week and merge it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I couldn't manage time to test it yet. Hoping to do it today/tomorrow.

@rajumsys rajumsys merged commit 7f13ec0 into SparkPost:master Oct 31, 2017
@rajumsys
Copy link
Contributor

Thanks @d4mation. Merged it.

@d4mation
Copy link
Contributor Author

d4mation commented Nov 1, 2017

No problem, @rajumsys!

maxharrisnet pushed a commit that referenced this pull request Sep 17, 2020
AC-1552 Migrate the sites/default/files directory
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