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

Embed/Attach files from URLs? #58

Open
phedoreanu opened this issue Jun 12, 2016 · 4 comments
Open

Embed/Attach files from URLs? #58

phedoreanu opened this issue Jun 12, 2016 · 4 comments

Comments

@phedoreanu
Copy link

phedoreanu commented Jun 12, 2016

Hello,

I would like to send emails with embedded files from URLs.

SetCopyFunc only has access to io.Writer.

How would one replace os.Open with i.e http.Get?

@phedoreanu phedoreanu changed the title Embed/Attach file from URL? Embed/Attach files from URL? Jun 12, 2016
@phedoreanu phedoreanu changed the title Embed/Attach files from URL? Embed/Attach files from URLs? Jun 13, 2016
@crasm
Copy link

crasm commented Dec 22, 2016

I added some functionality for attaching/embedded from any data source (io.Reader). I believe it would let you make URLs less of a special case since you could pass the http.Response directly to AttachFromReader and EmbedFromReader.

https://github.com/crasm/gomail/commit/278dd7902726ff7796c2b1cab1119737e24241b5

@kumarharsh
Copy link

Was just looking for the same functionality for attaching user images in the emails. Good work @crasm. @alexcesaro would it be possible to merge this into the library?

@crasm
Copy link

crasm commented May 9, 2017

@kumarharsh I think #78 solves this as well as my version, so that PR just needs to be approved.

@kumarharsh
Copy link

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

No branches or pull requests

3 participants