Salut à tous,
Alors depuis un moment je tente de créer un petit client smtp en c++ et maintenant je m'attaque à l'envoi de pièce jointe.
Biensur celà ne fonctionne pas et je ne sais pas trop pourquoi.
Voici les messages générés lors de la discussion avec le serveur:
Voilà.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 22:47:16: -- Send: MAIL FROM: <XXX@laposte.net> 22:47:18: -- Server replys: 250 MAIL FROM:<XXX@laposte.net> OK 22:47:18: -- Send: RCPT TO: <XXX@gmail.com> 22:47:20: -- Server replys: 250 RCPT TO:<XXX@gmail.com> OK 22:47:20: -- Send: DATA 22:47:22: -- Server replys: 354 Start mail input; end with <CRLF>.<CRLF> 22:47:22: -- Send: From: send testeur <XXX@laposte.net> 22:47:22: -- Send: To: receive testeur <XXX@gmail.com> 22:47:22: -- Send: Subject: Test 22:47:22: -- Send: Date: 04/05/07 22:47:22 22:47:22: -- Send: MIME-Version: 1.0 22:47:22: -- Send: Content-Type: multipart/mixed; 22:47:22: -- Send: boundary= "spliter_etr_kjvvhdd_rrte" 22:47:22: -- Send: 22:47:22: -- Send: --spliter_etr_kjvvhdd_rrte 22:47:22: -- Send: Content-Type: text/html; charset="iso-8859-1" 22:47:22: -- Send: Content-Disposition: inline 22:47:22: -- Send: 22:47:22: -- Send: test d'email 22:47:22: -- Send: 22:47:22: -- Send: --spliter_etr_kjvvhdd_rrte 22:47:22: -- Send: Content-Type: text/plain; name= readme.txt 22:47:22: -- Send: Content-Disposition: attachment; filename= "readme.txt" 22:47:22: -- Send: Content-Transfer-Encoding: base64 22:47:22: -- Send: 22:47:22: -- Send: //fichier base64 encodé 22:47:22: -- Send: --spliter_etr_kjvvhdd_rrte-- 22:47:22: -- Send: . 22:47:24: -- Server replys: 250 <45FA4DD100245DBD> Mail accepted
Mais avec ça, je reçois un message vide, sans le texte donc à l'intérieur accompagné d'une pièce jointe de 8Ko sans nom et illisible ni téléchargeable sur le serveur.
Pourriez vous me dire ce que je fais mal? ce qui manque?
merci
Partager