Toon posts:

[java / SMTP] mail komt maar niet goed aan

Pagina: 1
Acties:
  • 38 views sinds 30-01-2008

Verwijderd

Topicstarter
Hallo,

Ik ziet met het het probleem dat mijn mail niet goed aankomt
inn outlook die ik gemaakt heb op een embedded systeem waar
JDK 1.1.8 op draait met een speciale mail functie.

De mail functie is de volgende:
smtp.sendMessage(String from, String to,String subject,String header, String message);

Ik moet dus naar mijn weten in de header specificeren dat er een attachment in zit.
En deze vervolgens in de message body plaatsen ?

code:
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
De binnenkomende mail ziet er nu als volgt uit:
From: lj4345mfp@bogus.nl
Subject: Incoming attachment
To: me@bogus.nl
Mime-Version 1.0
Content-Type: multipart/mixed; boundary="boundaryLine"
Status: 0
--boundaryLine
Content-Type: multipart/mixed; boundary="boundaryLine_inner"
--boundaryLine_inner
Content-Type: APPLICATION/octet-stream; name=logo.tif
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=logo.tif

SUkqAAgAAAAPAP4ABAABAAAAAAPgAAAAAA
AAAAAAAHgAAAAAAAAAA+AAAAAAAAAAAAAAeA

<save some space here>

WVudCBEYXRhIEJsb2NrAAAAAAA=
--boundaryLine_inner--

--boundaryLine
Content-Type: TEXT/PLAIN; charset=iso-8859-1
 This is a incoming attachment

--boundaryLine--


Is er ergens een voorbeeld te vinden, waar een attachment in een mail
gestopt wordt? Niet hoe, maar hoe zo'n SMTP/ multipart bericht er
dan wel uit moet zien :)

Bij voorbaat dank

  • moto-moi
  • Registratie: Juli 2001
  • Laatst online: 09-06-2011

moto-moi

Ja, ik haat jou ook :w

1 topic is genoeg lijkt me.

God, root, what is difference? | Talga Vassternich | IBM zuigt


Dit topic is gesloten.