Closed guybrand closed 9 years ago
Have you tried using NewCustomMailer with a nil Auth?
Nop , same error L
x509: certificate signed by unknown authority
From: Alexandre Cesaro [mailto:notifications@github.com] Sent: Monday, April 20, 2015 5:05 PM To: go-gomail/gomail Cc: GuyBrand Subject: Re: [gomail] anonymous relay (#32)
Have you tried using NewCustomMailer with a nil Auth?
— Reply to this email directly or view https://github.com/go-gomail/gomail/issues/32#issuecomment-94460495 it on GitHub. https://github.com/notifications/beacon/AFpMciLdbwlqAS1tpiOPLXzItXYJcoiUks5oBP8IgaJpZM4EDwcF.gif
Have you tried what's in the readme? https://github.com/go-gomail/gomail#x509-certificate-signed-by-unknown-authority
Yes , no help there .
Notice that if I use NewMailer , I must empty the UN/PW
mailer := gomail.NewMailer("mysmtp.net", "", "", 25, gomail.SetTLSConfig(&tls.Config{InsecureSkipVerify: true}))
guy .
From: Alexandre Cesaro [mailto:notifications@github.com] Sent: Monday, April 20, 2015 5:21 PM To: go-gomail/gomail Cc: GuyBrand Subject: Re: [gomail] anonymous relay (#32)
Have you tried what's in the readme? https://github.com/go-gomail/gomail#x509-certificate-signed-by-unknown-authority
— Reply to this email directly or view https://github.com/go-gomail/gomail/issues/32#issuecomment-94465689 it on GitHub. https://github.com/notifications/beacon/AFpMcisyDC9H44CYy-wPqLFtLsnx_ffeks5oBQLNgaJpZM4EDwcF.gif
What is the error in this case?
You should try using both NewCustomMailer with nil Auth and SetTLSConfig.
Both return same error :
x509: certificate signed by unknown authority
From: Alexandre Cesaro [mailto:notifications@github.com] Sent: Monday, April 20, 2015 6:26 PM To: go-gomail/gomail Cc: GuyBrand Subject: Re: [gomail] anonymous relay (#32)
What is the error in this case?
You should try using both NewCustomMailer with nil Auth and SetTLSConfig.
— Reply to this email directly or view https://github.com/go-gomail/gomail/issues/32#issuecomment-94483243 it on GitHub. https://github.com/notifications/beacon/AFpMcrkFVxhOqFwcNnITfiqJvLIvGHgWks5oBRIOgaJpZM4EDwcF.gif
Hi .
The Client's IT has sent me a CERT file thinking it may solve the situation . I dont know if it has anything to do with it , but now , when I : mailer := gomail.NewMailer("serverIp", "", "", 25, gomail.SetTLSConfig(&tls.Config{InsecureSkipVerify: true})) I get the error : 504 5.7.4 Unrecognized authentication type same if I put something in the UN/PW
Good news ! and a question
the news : I've figured it out : I use the simple : mailer := gomail.NewMailer("serverIp", "", "", 25)
and I have an anonymous relay working .
question is : would you like to implant that in a nicer way on your code , so it will support whatever it does now , as well as the anonymous relay ?
Guy .
Ok I will have a look.
Hello, it would be cool if you tried Gomail v2 (still unstable) and tell me if it works:
package main
import (
"gopkg.in/gomail.v2-unstable"
)
func main() {
m := gomail.NewMessage()
m.SetHeader("From", "from@example.com")
m.SetHeader("To", "to@example.com")
m.SetHeader("Subject", "Test")
m.SetBody("text/html", "Test")
d := &gomail.Dialer{Host: "smtp.example.org", Port: 587}
if err := d.DialAndSend(m); err != nil {
panic(err)
}
}
I just edited my previous answer.
Hi .
I'm off to a weekend , will do that early next week .
Thanks !
BTW , the current "workaround" is already in production .
From: Alexandre Cesaro [mailto:notifications@github.com] Sent: Thursday, July 16, 2015 11:42 PM To: go-gomail/gomail Cc: GuyBrand Subject: Re: [gomail] anonymous relay (#32)
Hello, it would be cool if you tried Gomail v2 (still unstable) and tell me if it works:
package main
import ( "gopkg.in/gomail.v2-unstable" )
func main() { m := gomail.NewMessage() m.SetHeader("From", "from@example.com") m.SetHeader("To", "to@example.com") m.SetHeader("Subject", "Test") m.SetBody("text/html", "Test")
d := gomail.NewPlainDialer("smtp.example.com", "user", "123456", 587)
d.Auth = nil
if err := d.DialAndSend(m); err != nil {
panic(err)
}
}
— Reply to this email directly or view https://github.com/go-gomail/gomail/issues/32#issuecomment-122086189 it on GitHub. https://github.com/notifications/beacon/AFpMciMmm80QIXY2Z0ODM6WRq1LNozxPks5oeA6ZgaJpZM4EDwcF.gif
Hi .
I am trying to relay on a server with no authentication . using a telnet client , I can simply :
I tried to create an Auth with Start function that returns immediately , with empty return value , or "MAIL FROM:" , but I guess no matter what I do , smtp package will go through : code, msg64, err := c.cmd(0, "AUTH %s %s", mech, resp64) that the server will decline .
Do you have an idea for doing anonymous connection/ESMTP AUTH . my best help so far was http://www.fehcom.de/qmail/smtpauth.html
Thanks .