das ist der code, um eine einzelne mail abzufragen.
der ist in einer while-schleife, solange mails da sind...
Set msg = pop3.DownloadSingleMessage(loopcontrol)
'************* ERSTELLEN DER RECIPIENTS EINER MAIL
***************************
ReTo = ""
ReCC = ""
Set Recipients = msg.Recipients
separator = ", "
for i = 0 to Recipients.Count - 1
If (i = Recipients.Count - 1) then
separator = ""
end if
Set re = Recipients.item(i)
if (re.ReType = 0) then
Reto = ReTo & re.EMail & separator
else
ReCC = ReTo & re.EMail & separator
end if
next
'***************************************************************************
**
datum = msg.Date
fromName = msg.fromName
from = msg.From
CC = ReCC
BCC = ReCC
Subject = msg.Subject
Body = msg.Body
HTMLBody = msg.HTMLBody
On error resume next
size = msg.size
If err.number<>0 then
size = 1000
End if
Err.clear : on error goto 0
postfach = "Posteingang"
'************* Email Daten in die Datenbank einfuegen
*****************************
sqlCommand = "INSERT into mails VALUES(" &_
"'" & datum &_
"','" & user &_
"'," & SQLString(fromName) &_
"," & SQLString(from) &_
"," & SQLString(CC) &_
"," & SQLString(CC) &_
"," & SQLString(Subject) &_
"," & SQLString(HTMLBody) &_
"," & SQLString(Body) &_
"," & size &_
"," & SQLString(id) &_
"," & SQLString(postfach) &_
",'unread')"
conn.Execute(sqlCommand)
sql = "INSERT INTO mailIDs VALUES ('"&user&"','"&id&"')"
conn.Execute(sql)
Set Attachments = msg.Attachments
separator = ", "
For i = 0 To Attachments.Count - 1
If i = Attachments.Count - 1 Then
separator = ""
End If
Set at = Attachments(i)
On Error Resume Next
attachmentName = at.Name
attachmentSize = at.Size
response.write("<br>Size:" & attachmentSize)
if ((attachmentName = ".msg") OR (attachmentName = "winmail.dat")) then
newName = attachmentName&id
at.SaveToFile( Session("Pfad")&newName )
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Session("Pfad")&newName, 1, True)
ausgabe = f.ReadAll
f.DeleteFile ( Session("Pfad") & newName )
f.close
sql = "UPDATE mails SET Body = " & SQLString(ausgabe) & " WHERE id = '"
& id & "'"
conn.Execute(sql)
else
attachmentPfad = Session("Pfad") & id & "\"
Set fso = CreateObject("Scripting.FileSystemObject")
f = fso.CreateFolder(attachmentPfad)
f.close
at.SaveToFile( attachmentPfad & attachmentName )
On Error Resume Next
attachmentSize = at.Size
sql = "INSERT INTO attachments VALUES
('"&id&"','"&attachmentName&"','"&user&"','"&attachmentSize&"')"
conn.Execute(sql)
On Error Goto 0
end if
Thomas Beckert - SitePoint GbR
Vorstadtstr.57
66117 Saarbrücken
Tel.: 0681 / 9 47 26 27
Fax: 0681 / 9 47 26 28
----- Original Message -----
From: "Mayer, Stefan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 19, 2003 2:37 PM
Subject: AW: [Coffeehouse] leerer body bei jmail
> kannst mal den Sourcecode posten?
>
> -----Ursprüngliche Nachricht-----
> Von: Thomas Beckert [mailto:[EMAIL PROTECTED]
> Gesendet: Di 19.08.2003 14:38
> An: [EMAIL PROTECTED]
> Cc:
> Betreff: Re: [Coffeehouse] leerer body bei jmail
>
>
>
> aha. und wo bekommt man dann den inhalt her bzw. wie merke ich, wann eine
> mail sowas dummes tut?
> :)
>
> Thomas Beckert - SitePoint GbR
>
> Vorstadtstr.57
> 66117 Saarbrücken
>
> Tel.: 0681 / 9 47 26 27
> Fax: 0681 / 9 47 26 28
> ----- Original Message -----
> From: "Mayer, Stefan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 19, 2003 2:33 PM
> Subject: AW: [Coffeehouse] leerer body bei jmail
>
>
> > Das "PRoblem" hatte ich auch mal - ich weiß aber nicht mehr, was ich
> gemacht habe, kann mch aber daran erinnern, daß es damit zu tun hatte, daß
> ich den HT&ML-Bodyx oder den "normalen" Body abgefragt habe oder
onstwas -
> weil nicht alle MAils in HTML und Text vorliegen - und manche HTML-Mails
als
> Text nur ein - haben oder so...
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Thomas Beckert [mailto:[EMAIL PROTECTED]
> > Gesendet: Di 19.08.2003 14:18
> > An: [EMAIL PROTECTED]
> > Cc:
> > Betreff: [Coffeehouse] leerer body bei jmail
> >
> >
> >
> > hi liste-
> >
> > ich habe via jmail eine email abgerufen und sie in eine datenbank
> > gespeichert.
> > aber alles, was im body steht ist ein "-"....
> > via outlook zeigt er mir alles an.
> >
> > der header der mail hat folgenden inhalt:
> >
> > Received: from kogi.natinst.com [130.164.130.141] by
> ndmail5.name-server.de
> > with ESMTP
> > (SMTPD32-6.06) id A0E65700124; Tue, 19 Aug 2003 10:33:42 +0200
> > Received: from austinhub.natinst.com (austinhub.natinst.com
> > [130.164.130.95])
> > by kogi.natinst.com (Postfix) with ESMTP id EE1B2BE043
> > for <[EMAIL PROTECTED]>; Tue, 19 Aug 2003 03:21:54 -0500 (CDT)
> > Subject: RE:Gibt es ein fertiges Lab-View Modul
> > =?iso-8859-1?Q?f=FCr_die_=DCberwachung_eines_K=FChlbeh=E4lters=3F?=
> > To: "Thomas Beckert" <[EMAIL PROTECTED]>
> > X-Mailer: Lotus Notes Release 5.0.4 June 8, 2000
> > Message-ID: <[EMAIL PROTECTED]>
> > From: [EMAIL PROTECTED]
> > Date: Tue, 19 Aug 2003 10:21:45 +0200
> > X-MIMETrack: Serialize by Router on AustinHub/AUS/H/NIC(Release 5.0.9a
> > |January 7, 2002) at
> > 08/19/2003 03:21:53 AM
> > MIME-Version: 1.0
> > Content-type: multipart/mixed;
> > Boundary="0__=09BBE714DFBE74D68f9e8a93df938690918c09BBE714DFBE74D6"
> > Content-Disposition: inline
> > X-RCPT-TO: <[EMAIL PROTECTED]>
> > X-UIDL: 334618322
> > Status: U
> >
> > ist das was, was ich nicht beachtet habe oder so ???
> >
> > _______________________________________________
> > Coffeehouse mailing list
> > [EMAIL PROTECTED]
> > http://www.glengamoi.com/mailman/listinfo/coffeehouse
> >
> >
> >
>
> _______________________________________________
> Coffeehouse mailing list
> [EMAIL PROTECTED]
> http://www.glengamoi.com/mailman/listinfo/coffeehouse
>
>
>
_______________________________________________
Coffeehouse mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/coffeehouse