send mail using sockets
Posted on 2004-09-14
I have a program in C which uses unix sockets to send mail from server to microsoft exchange client. The mail are sent using the email relay.
If i try HELO.., MAIL FROM.. (manually), it works fine, but when i try the same using the program i get the error 'Timeout occured for client' .
The C program establishes connection and sends data in the order of
2. MAIL FROM: <from emailid>\n
3. RCPT TO: <to emailid>\n
4. DATA ..
After each step there is a read command to check if the earlier command has completed without errors. My problem is that, the program hangs after step 2 and i get error "451 Timeout waiting for client input" after about 10 minutes.