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

Store generated mail as file #18

Closed
wneessen opened this issue Jun 6, 2022 · 0 comments · Fixed by #19
Closed

Store generated mail as file #18

wneessen opened this issue Jun 6, 2022 · 0 comments · Fixed by #19
Assignees
Labels
enhancement New feature or request

Comments

@wneessen
Copy link
Owner

wneessen commented Jun 6, 2022

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

I found this issue go-gomail/gomail#171 and thought it might be nice addition to the library being able to store generated mails as files. Since we already have Msg.WriteTo it should be fairly simple to realize.

I'll have to check the EML specifications if there is any file sepecific formating needed, though.

Describe alternatives you've considered

No response

Additional context

No response

@wneessen wneessen added the enhancement New feature or request label Jun 6, 2022
@wneessen wneessen self-assigned this Jun 6, 2022
wneessen added a commit that referenced this issue Jun 9, 2022
wneessen added a commit that referenced this issue Jun 9, 2022
- We have two versions of this method:
  - One for Go versions below 1.17 using `ioutil.TempFile()`
  - One for Go versions >= 1.17 using `os.CreateTemp()`
wneessen added a commit that referenced this issue Jun 9, 2022
- Renamed `Msg.WriteToTempfile` to `Msg.WriteToTempFile`
- Added test coverage for `Msg.WriteToFile` and `Msg.WriteToTempFile`
wneessen added a commit that referenced this issue Jun 9, 2022
Added a support note for #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant