Thank you first.
I am writing a linux application trying to send email to a qmail server. I
am able to send a very small sized data across successfully and receive in
in a mailbox ok, but when the data size becomes larger, it seems that the
email vanished in the air!
Any idea? Below is the code...
==========================================
sockfd = socket ( PF_INET, SOCK_STREAM, 0 );
ina.sin_family = AF_INET;
ina.sin_addr.s_addr = inet_addr ( server );
ina.sin_port = htons ( portnum );
memset ( ina.sin_zero, 0, 8 );
connect ( sockfd, ( struct sockaddr * ) &ina, sizeof ( struct
sockaddr ) );
slen = strlen ( pstr );
ptmp = pstr;
sentlen = 0;
leftover = slen;
do {
sentlen = send ( sockfd, ptmp, slen-sentlen, 0 );
ptmp += sentlen;
} while ( ptmp < ( pstr + slen ) );
shutdown ( sockfd, 2 );
close ( sockfd );
==========================================