When calling Client.hello(), and the smtp server returns a failure code 
(this can be reproduced via postfix smtp-sink and a flag of -r HELO,EHLO) 
another attempt at a Hello is not possible.

https://github.com/golang/go/blob/master/src/net/smtp/smtp.go#L75 shows 
that the didHello flag is set before the HELO command actually takes place, 
so even a failure still results in didHello = true

Calling a second Hello() after the first one failed results in an error:
"smtp: Hello called after other methods"

But because the first Hello() failed, I expected to be able to make a 
second attempt. As is, I have to close the connection and open a new one in 
order to reattempt.

Is this standard SMTP behavior? 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to