Skip to content

Commit

Permalink
Ajout des entêtes du destinataire et provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph0tonic committed Jun 18, 2017
1 parent 4632a94 commit ea04ba1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file modified client_SMTP
Binary file not shown.
7 changes: 7 additions & 0 deletions client_SMTP.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,16 @@ int smtp_send(char* sender,char* recipient,char* subject,char* body,char* server
break;
case DATA2:
//Header
sprintf(buffer,"From: %s\n",sender);
printf("From: %s\n",sender);
fprintf(f,buffer);
sprintf(buffer,"To: %s\n",recipient);
printf("To: %s\n",recipient);
fprintf(f,buffer);
sprintf(buffer,"Subject: %s\n",subject);
printf("Subject: %s\n",subject);
fprintf(f,buffer);

//Content
while(fgets(buffer,sizeof(buffer)-1,message))
{
Expand Down

0 comments on commit ea04ba1

Please sign in to comment.