问题1:多个收件人怎么一次性发送邮件?SMTP协议的对应格式又是怎么样的?
我一开始是通过多次发送,每次发送一个邮箱地址。
memset(m_cSendBuff,0,sizeof(m_cSendBuff));
sprintf_s(m_cSendBuff,100000,"RCPT TO:<%s>\r\n",m_sMailInfo.m_pcReceiver);
rt=send(sock,m_cSendBuff,strlen(m_cSendBuff),0);
if(rt!=strlen(m_cSendBuff))
{
return false;
}
recv(sock,m_cReceiveBuff,1024,0);
if(m_cReceiveBuff[0]!='2' || m_cReceiveBuff[1]!='5' || m_cReceiveBuff[2]!='0')
{
MessageBox(NULL, "收件人邮箱地址有误!", "警告", NULL);
return false;
}
问题2:抄送人的邮件该怎么发送?对应的SMTP协议格式怎么写?
求大神指点···
------解决思路----------------------
字符串:
Cc: somebody <[email protected]>, somebody2 <[email protected]>