- /* Do an AUTH command if necessary */
- sprintf(buf, "%s%c%s%c%s",
- SendMsg->pCurrRelay->User, '\0',
- SendMsg->pCurrRelay->User, '\0',
- SendMsg->pCurrRelay->Pass);
- CtdlEncodeBase64(encoded, buf,
- strlen(SendMsg->pCurrRelay->User) * 2 +
- strlen(SendMsg->pCurrRelay->Pass) + 2, 0);
- StrBufPrintf(SendMsg->IO.SendBuf.Buf,
- "AUTH PLAIN %s\r\n", encoded);
+ /* Do an AUTH command if necessary */
+ if (Msg->SendLogin)
+ {
+ StrBufPlain(Msg->IO.SendBuf.Buf,
+ HKEY("AUTH LOGIN\r\n"));
+ }
+ else
+ {
+ sprintf(buf, "%s%c%s%c%s",
+ Msg->pCurrRelay->User, '\0',
+ Msg->pCurrRelay->User, '\0',
+ Msg->pCurrRelay->Pass);
+
+ CtdlEncodeBase64(encoded, buf,
+ strlen(Msg->pCurrRelay->User) * 2 +
+ strlen(Msg->pCurrRelay->Pass) + 2, 0);
+
+ StrBufPrintf(Msg->IO.SendBuf.Buf,
+ "AUTH PLAIN %s\r\n",
+ encoded);
+ }