Smtp& SSL(bool b = true) { ssl = b; if(b) starttls = !b; return *this; } Smtp& StartTLS(bool b = true) { starttls = b; if(b) ssl = !b; return *this; }
503 5.5.1 Error: send HELO/EHLO first
String ans = SendRecv("AUTH LOGIN\r\n");
throw Exc("Server does not provide SMTP service information."); } //else SendRecvOK("HELO " + org + "\r\n"); if(!IsNull(auth_user)) { String ans = SendRecv("AUTH LOGIN\r\n"); ...
... // receive initial message & send hello do{ ans=SendRecv(Null); }while(ans[3]=='-'); String org; int pos = sender.Find('@'); ...
SMTP send: Reply: 220-relay.myisp.com ESMTP Postfix SMTP send: Reply: 220 relay.myisp.com ESMTP Postfix SMTP send: EHLO mydomain.com ...
That is, adding the do-while loop and checking the answer for the dash. My ISP (or rather their Postfix server) occasionally sends the greeting with a dash (220-...) indicating a multi-line response. and then on the next line will follow the final greeting. If that is not picked out from the queue, the EHLO will fail. After fixing the code as above, the trace from Smtp:: will show desired behavior with Postfix server:
if(!ext.Find("starttls") < 0)
if(ext.Find("starttls") < 0)
The following line compiles with "warning C4804: '<': unsafe use of type 'bool' in operation":
if(!ext.Find("starttls") < 0)