Home > Back-end >  Linux server C SMTP email, mail contents missing
Linux server C SMTP email, mail contents missing

Time:12-05

Recently in the test environment using C language SMTP email is no problem, the production end mail content is missing, for several days didn't find the problem, I am a JAVA programmer, this is an old project, for maintenance, please C, Linux, TCP related technical problems under the great god help eliminate?

Story:
Is GBK client global environment, the use of C to read HTML files (GBK), connect to mail server (GBK), SOCKET with each cache will be HTML file content delivery to a mail server 1024

Have screen: (generation does not allow caught, please understand)
1. The client fread file for each 1024 bytes, but write the return value is smaller than 1024 (online said write the return value is smaller than send the value through the network)
2. Fread content write content after the security key has been sent to write temporary files, temporary files display content is complete, and sent to the email server, mail server to be received DATA, DATA stored in a temporary file, the content of the file content is missing
3. Each time he received mail about all around 22460 bytes (... Article 80 & lt; tr> . ), more than 80, the following content to see

This several days for possible problems:
1. 1024 fread file, but the write send actual is smaller than 1024 [write problem]
2. The socket to send information, communication packet loss [network]
3. Send a maximum cache cache sent over Linux, result in buffer overflow, lack of content/Linux configuration problems
4. Send mail system after routing production, TCP unpacking spell content missing packet error [nic issue]

Send HTML code below is C, the other parts because the secret is not to (is SMTP content regulation, HELO/AUTH LOGIN... )




normal mail, classified please understand [: QQQ]



more than 80, missing the mail

CodePudding user response:


Before I also CMD console Telnet email, according to the SMTP protocol manual input code,

CodePudding user response:

If the server Settings sotimeout it will watch you hand speed, ha, ha, ha
  • Related