1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
char HELO[4][100] = {"HELO smtp.gmail.com\n",
"MAIL FROM: <test@yahoo.com>\n",
"RCPT TO: <exemple@gmail.com>\n",
"DATA\r\n"};
char DATA[4][100] {"From: <test@yahoo.com>\n",
"To: <exemple@gmail.com>\n",
"Subject: Test\n",
"Le corp c'est ici =)\n"};
char QUIT[2][100] {".\n",
"QUIT\n"};
for(int i = 0; i<4; i++)
{
send(sock, HELO[i], strlen(HELO[i]), 0);
recept_S(sock);
}
for(int i = 0; i<4; i++)
send(sock, DATA[i], strlen(DATA[i]), 0);
for(int i = 0; i<2; i++)
{
send(sock, QUIT[i], strlen(QUIT[i]), 0);
recept_S(sock);
}
|