go-pkgz / email Goto Github PK
View Code? Open in Web Editor NEWEmail library to send simple messages
Home Page: https://go-pkgz.umputun.dev/email/
License: MIT License
Email library to send simple messages
Home Page: https://go-pkgz.umputun.dev/email/
License: MIT License
This is about cid and all of this, see for more info this article
I think it would be useful to have reusable connections pool in case sending batch of emails.
please add the ability to make tls InsecureSkipVerify flag configurable. ref #19
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
looks like Microsoft does not allow Plain Auth anymore, which is used in go-pkgz/email/email.go.
The go net/smtp
package does not support the login mechanism LOGIN
.
Here is an example I found for login auth using net/smtp
https://gist.github.com/homme/22b457eb054a07e7b2fb
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)
.
It would be nice to have a String function available in the Sender.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.