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

Create hyperlinks for URLs in plaintext emails #13

Merged
merged 1 commit into from
Mar 13, 2016

Conversation

GREsau
Copy link
Contributor

@GREsau GREsau commented Jan 31, 2016

This will change all URLs found in plaintext emails to hyperlinks. The links should open in a new tab, like they currently do with HTML emails.

The regexp to find URLs is fairly dumb, but it seems to do the job - for each occurrence of http:// or https://, it just keeps going until it finds a character that is not valid in a URL (e.g. whitespace).

I didn't commit the updated assets.go, since I'm using Windows which messed with the line-endings and file permissions (which I'm 98% sure doesn't actually matter, but I'm erring on the side of caution).

@GREsau
Copy link
Contributor Author

GREsau commented Jan 31, 2016

A quick before/after comparison with a test email:
mailhog-before
mailhog-after
Not much to see, just a couple of hyperlinks.

Also, the failed travis CI build looks unrelated to my actual changes. I'm not sure why the uuid package is even in the makefile, so I'll leave it for someone else to investigate.

@ian-kent ian-kent merged commit 22a6426 into mailhog:master Mar 13, 2016
@ian-kent
Copy link
Member

thanks @GREsau

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