forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Mail Header

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GregLand
Valued Contributor
Valued Contributor


Joined: 15 Jun 2004
Posts: 212
Location: FRANCE

PostPosted: Thu Sep 02, 2004 12:28 pm    Post subject: Mail Header Reply with quote

Hi every body !

I would like to parse an email header to find only the subject of the mail...
Is it possible ? Sad
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
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Sep 02, 2004 5:46 pm    Post subject: Reply with quote

Hi GregLand, welcome to VDSWORLD... Smile Can you post an example header, so that we can find a way to parse it out of the whole header stuff? I do have lying the vdsinet dll around somewhere, but I can't find it right now... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
GregLand
Valued Contributor
Valued Contributor


Joined: 15 Jun 2004
Posts: 212
Location: FRANCE

PostPosted: Thu Sep 02, 2004 6:11 pm    Post subject: Reply with quote

Thanks for your answer... Wink
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... Shocked

How can I do to find all the time the real Subject of the message
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Sep 02, 2004 6:36 pm    Post subject: Reply with quote

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... Smile 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
View user's profile Send private message
GregLand
Valued Contributor
Valued Contributor


Joined: 15 Jun 2004
Posts: 212
Location: FRANCE

PostPosted: Thu Sep 02, 2004 10:32 pm    Post subject: Reply with quote

Very good... thanks a lot !!!!
A hope it will work with the major part of header !!! Worship
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Sep 03, 2004 6:58 am    Post subject: Reply with quote

Like I said, you can copy the if-end code yourself and change it if you want to parse out other headers... Smile The only thing which needs to be changed is the "Subject =" part... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
GregLand
Valued Contributor
Valued Contributor


Joined: 15 Jun 2004
Posts: 212
Location: FRANCE

PostPosted: Fri Sep 03, 2004 10:10 am    Post subject: Reply with quote

Ok ! Thumbs Up
Not very difficult in fact... Embarassed
I will test on others headers
Thanks !
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group