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 


parse a mail header to remove the subject line

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


Joined: 01 May 2003
Posts: 61

PostPosted: Thu Mar 25, 2004 4:10 pm    Post subject: parse a mail header to remove the subject line Reply with quote

Hi folks,
I have been trying to parse a mail header to remove the subject line and
just give the" from name"
however i can't find out what the the seperator is
example of header------
meathome<meatwork@mail.com>just a test
here it shows as a "  " on a simple text editor (notepad its a vertical bar)

when I copy the seperator in a @asc() it tells me its a period ( .) or 46
and thats not quite right...
thanks for the input...

harry
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Mar 25, 2004 7:21 pm    Post subject: Reply with quote

Hi Harry,
The character you posted is the ASCII character "7". As in @chr(7)... Strange that an email header would have such a character?

Code:


%%Myheader = "meathome<meatwork@mail.com>""just a test"
%%Myheaderlen = @len(%%Myheader)
%%cnt = 1
repeat
  %%Char = @SubStr(%%Myheader,%%cnt)
  Info %%Char@CR()@asc(%%Char)@CR()
  %%cnt = @Succ(%%cnt)
until @Greater(%%cnt,%%Myheaderlen)



I hope the above code helps you.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Mar 25, 2004 7:46 pm    Post subject: Reply with quote

Hi all,
Something is wrong with the VDS code option on the forum... When you download the script above it does not include the script just the header...

Below is a resubmit with the regular PHPBB Code button...

Code:


  %%Myheader = "meathome<meatwork@mail.com>""just a test"
  %%Myheaderlen = @len(%%Myheader)
  %%cnt = 1
  repeat
    %%Char = @SubStr(%%Myheader,%%cnt)
    Info %%Char@CR()@asc(%%Char)@CR()
    %%cnt = @Succ(%%cnt)
  until @Greater(%%cnt,%%Myheaderlen)


_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Thu Mar 25, 2004 10:08 pm    Post subject: Reply with quote

as i said the seperator is different (each time) if its copied and pasted
on this site or into notepad or even the vds script window....
i agree with you that its strange!!!!!!!!!!!!!!!!!
does anybody know what the seperator really is??
thanks again,
harry
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sat Mar 27, 2004 5:18 pm    Post subject: Reply with quote

Harry,
Open the header of the email with a Hex editor to see what the value of the character really is. I take it is in a file if your downloading the email with a custom application right? If so there is a Hex editor demo that comes with VDS 5 that you can use to view the header. If you using VDS to capture the header then just iterate through the characters of the header with the code that I posted and it will actually show you the character that is being sent.

I am thinking that it is something specific to either the POP3 or SMTP servers that are in the chain when the email is sent and recieved from point A to B...

If all else fails you can try reading the RFC (ie.. Request for comments)for email. The RFC you want to read is rfc822 and can be found here ftp://ftp.isi.edu/in-notes/rfc822.txt
or
here http://www.worldtalk.com/Standards%20and%20Tech/emailref.shtm

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Tue Mar 30, 2004 9:43 pm    Post subject: Reply with quote

Thanks MP
i'll check it out
your code works good!!
harry
Back to top
View user's profile Send private message
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