struct sockaddr_in pin;
int mysock;
bzero(&pin, sizeof(pin));
pin.sin_family = AF_INET;
pin.sin_addr.s_addr = inet_addr("10.88.0.58");
pin.sin_port = htons(25);
mysock = socket(AF_INET, SOCK_STREAM, 0);
if (mysock == -1) {
printf("Smtpclient.c: Failed to establish socket for 10.88.0.58.\n");
return -1;
}
if (connect(mysock, (void *)&pin, sizeof(pin)) == -1) {
printf("Smtpclient.c: Failed to connect to 10.88.0.58.\n");
return -1;
}