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

Named attachements #81

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Conversation

Sata51
Copy link

@Sata51 Sata51 commented Mar 12, 2019

Add the ability to attach a file with a custom file name
Instead of using the default:

e := NewEmail()
e.AttachFile("test.txt")

you can provide a custom named file using this:

e := NewEmail()
e.AttachFileWithName("internalName.txt", "publicName.txt")

@Sata51 Sata51 force-pushed the named-attachements branch from fdc54c0 to b6eac76 Compare April 1, 2019 23:36
@jordan-wright
Copy link
Owner

Hi @Sata51,

This LGTM but could you do me a favor and add a test that confirms the behavior is working as expected?

Thanks!

@Sata51
Copy link
Author

Sata51 commented Apr 18, 2019

I've done it :D

* Support UTF-8 in email subject

Was trying to import that email sample from https://cdn.online-convert.com/example-file/document/eml/example.eml into GoPhish but the subject is just displayed as "=?UTF-8?Q?_EML Example File?=". The patch is adding UTF-8 support for the subject string.

* Support for more non-ASCII text in headers

According to RFC2047 non ascii text is also allowed in other fields like From, To, ...

* Add test function for non ascii email parsing
@NoelHG
Copy link

NoelHG commented Jan 7, 2020

I was about to push a branch with this exact change. It's pretty essential since most files on servers have crazy names with timestamps lol

JensRantil and others added 10 commits January 21, 2020 07:38
Removing comments that don't add significantly useful context.
I counted the fields being set and they are generally more than four
items.
Pin the expected compiler version. This shouldn’t break backwards compatibility.
Adds support for mime/related HTML attachments.
Initial commit of GitHub Actions for CI Testing
If the part has the header 'Content-Disposition' with a value of
'attachment' then add the part as an attachment to the Email.
A bug was introduced in 27742b0 where, in the process of trying to add TLS support, broke the way the connection is set up since it still tried to use `STARTTLS` under the hood.

Fixes jordan-wright#71.
* Format From, To, Cc & Bcc for RFC1342

* Fixed seperator & added tests
@Fank
Copy link
Contributor

Fank commented Jun 2, 2020

@jordan-wright could you may take a look at this again?

@Fank
Copy link
Contributor

Fank commented Jun 2, 2020

@Sata51 could you fix the conflicts?

@Sata51
Copy link
Author

Sata51 commented Jun 2, 2020

@Fank fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants