Giter VIP home page Giter VIP logo

email's People

Contributors

ad avatar gurza avatar paskal avatar s0x90 avatar umputun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

email's Issues

Connections pool

I think it would be useful to have reusable connections pool in case sending batch of emails.

Add support of attachments

This should be easy to do and probably we can just add another field to the sender.Params, like Attachments []string or Attachments []os.File

Sender timeOut doesn't work for TLS connections

Let's try to use passive loopback ip addresses in TestEmail_SendFailedMakeClient test for TLS Sender.
127.0.0.2 instead of 127.0.0.1
This is a general way to receive timeout network error.

func TestEmail_SendFailedMakeClient(t *testing.T) {
	// ...
	{
		s := NewSender("127.0.0.2", Port(225), TLS(true), TimeOut(time.Millisecond*200))
		err := s.Send("some text", Params{
			From:    "[email protected]",
			To:      []string{"[email protected]"},
			Subject: "subj",
		})
		require.Error(t, err)
	}
}

Run this test:

/usr/local/bin/go test -timeout 30s -run ^TestEmail_SendFailedMakeClient$ github.com/go-pkgz/email

The test will fail with panic message panic: test timed out after 30s. Whereas we expect to receive timeout network error cuz Sender timeout was set to 200ms TimeOut(time.Millisecond*200).

Support StartTLS

This is often a source of confusion as people try TSL/SSL against StartTLS port. Should be not hard to do as stdlib supports StartTLS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.