| View previous topic :: View next topic |
| Author |
Message |
GregLand Valued Contributor


Joined: 15 Jun 2004 Posts: 212 Location: FRANCE
|
Posted: Thu Sep 02, 2004 12:28 pm Post subject: Mail Header |
|
|
Hi every body !
I would like to parse an email header to find only the subject of the mail...
Is it possible ?
I use for that the extension vdsinet.dll, but some mail don't have the same form (structure)
How can i do that ? |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
GregLand Valued Contributor


Joined: 15 Jun 2004 Posts: 212 Location: FRANCE
|
Posted: Thu Sep 02, 2004 6:11 pm Post subject: |
|
|
Thanks for your answer...
For example i have this type of mail header
| Quote: | Return-Path <adresse@mail.com>
Received from server1 (ip adress1) by server2 (ip adress2)
id 411B3C06000F9C54 for sender; Thu, 2 Sep 2004 20 04
Date Thu, 2 Sep 2004 20
Message-Id <I3FE7T$60C795A718206D26CC0E63F123EEBF8C@tiscali.fr>
Subject =?iso-8859-1?Q?Subject_test?=
MIME-Version 1.0
X-Sensitivity 3
Content-Type multipart/alternative; boundary="_=__=_XaM3_.1094148281.2A.601540.42.4040.52.42.007.24808" |
it's the Subject =?iso-8859-1?Q?Subject_test?= that I would like to find... but the real subject is Subject Mail...
How can I do to find all the time the real Subject of the message |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Sep 02, 2004 6:36 pm Post subject: |
|
|
Here is some little code to get the subject if the "Subject =" header is used. To filter for other kind of headers, just copy the if-end part and change some of the parameters... Good luck!
| Code: | %x =
%x = %x"Return-Path <adresse@mail.com>"@cr()
%x = %x"Received from server1 (ip adress1) by server2 (ip adress2)"@cr()
%x = %x"id 411B3C06000F9C54 for sender; Thu, 2 Sep 2004 20 04"@cr()
%x = %x"Date Thu, 2 Sep 2004 20"@cr()
%x = %x"Message-Id <I3FE7T$60C795A718206D26CC0E63F123EEBF8C@tiscali.fr>"@cr()
%x = %x"Subject =?iso-8859-1?Q?Subject_test?="@cr()
%x = %x"MIME-Version 1.0"@cr()
%x = %x"X-Sensitivity 3"@cr()
%x = %x"Content-Type multipart/alternative; boundary=_=__=_XaM3_.1094148281.2A.601540.42.4040.52.42.007.24808"@cr()
if @greater(@pos("Subject =",%x),0)
%%Subject = @strdel(%x,1,@pred(@pos("Subject =",%x)))
%%Subject = @trim(@substr(%%Subject,1,@pred(@pos(@cr(),%%Subject))))
end
info %%Subject |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
GregLand Valued Contributor


Joined: 15 Jun 2004 Posts: 212 Location: FRANCE
|
Posted: Thu Sep 02, 2004 10:32 pm Post subject: |
|
|
Very good... thanks a lot !!!!
A hope it will work with the major part of header !!!  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
GregLand Valued Contributor


Joined: 15 Jun 2004 Posts: 212 Location: FRANCE
|
Posted: Fri Sep 03, 2004 10:10 am Post subject: |
|
|
Ok !
Not very difficult in fact...
I will test on others headers
Thanks ! |
|
| Back to top |
|
 |
|