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 


I dunno what to do...

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


Joined: 19 Oct 2001
Posts: 104

PostPosted: Mon Nov 25, 2002 4:46 pm    Post subject: I dunno what to do... Reply with quote

I use the vdsipp.dll to connect to a mailbox w/ the POP3 protocol for work. We used to use Netscape mail, and even if the sender was sending mail with HTML on only the text would show up. We have since switched to Outlook to send mail. Now when I get the message it has all the HTML code in it. Got any ideas what broke, or how I can fix it?
Back to top
View user's profile Send private message
flypaper
Contributor
Contributor


Joined: 19 Oct 2001
Posts: 104

PostPosted: Mon Nov 25, 2002 6:27 pm    Post subject: Reply with quote

This is what comes back btw:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=276315917-25112002><FONT face=Arial
size=2>test message</FONT></SPAN></DIV><br>-----------------------------------------------------------------------<br>


I only need the part that says 'test message.' How can I easily strip the rest off? And not everyone sends via HTML mail...
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Nov 25, 2002 9:51 pm    Post subject: Reply with quote

You can try using the VDSHTML.DLL in the VDSPACK. Smile
http://www.vdsworld.com/index.php?page=download&fileid=45

The VDSHTML.DLL will strip HTML tags leaving you with plain text.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Nov 26, 2002 7:08 am    Post subject: Reply with quote

Sounds like somebody messed with settings they shouldn't have Smile
Check out Garret's Non-DLL example of stripping HTML at:
http://www.vdsworld.com/index.php?page=download&fileid=146

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
flypaper
Contributor
Contributor


Joined: 19 Oct 2001
Posts: 104

PostPosted: Tue Nov 26, 2002 12:46 pm    Post subject: Reply with quote

Can someone explain to me how Garret's program works? I guess I don't really understand HTML all that well and one less DLL would be good. Thanks guys!

EDIT - Unless I'm doing something wrong Garret's program just loops. Hmmm
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Nov 26, 2002 9:30 pm    Post subject: Reply with quote

Maybe a more complete example might help you:

Code:
  DIALOG CREATE,HTML Stripper Example,-1,0,400,253
  DIALOG ADD,EDIT,EDIT1,6,4,392,95,,MULTI,SCROLL
  DIALOG ADD,BUTTON,BUTTON1,106,4,64,24,Browse
  DIALOG ADD,BUTTON,BUTTON2,106,78,174,24,Strip HTML Tags!
  DIALOG ADD,BUTTON,BUTTON3,106,260,64,24,Save
  DIALOG ADD,BUTTON,BUTTON4,106,332,64,24,Exit
  DIALOG ADD,EDIT,EDIT2,134,4,392,95,,MULTI,SCROLL
  DIALOG ADD,STATUS,STATUS1,
  DIALOG SHOW
  LIST CREATE,1
  LIST CREATE,2
:evloop
  wait event
  goto @event()

:BUTTON4BUTTON
:CLOSE
  LIST CLOSE,1
  LIST CLOSE,2
  exit

:BUTTON1BUTTON
  DIALOG SET,STATUS1,Working........
  %a = @filedlg("Web pages|*.htm;html;shtml|All files|*.*",Select local file)
  if @null(%a)
    DIALOG SET,STATUS1,IDLE
    goto evloop
  end
  LIST Clear,1
  LIST LOADFILE,1,%a
  rem %B = @text(1)
  DIALOG SET,EDIT1,@text(1)
  DIALOG SET,STATUS1,File loaded

  goto evloop

:BUTTON2BUTTON
  DIALOG SET,STATUS1,Stripping HTML!
  LIST Clear,2
  List Seek,1,0
  %A = @text(1)
  Repeat
    If @greater(@pos(<,%A),0)
      %B = @pos(<,%A)
      %C = @pos(>,%A)
      %D = @substr(%A,1,@fsub(%B,1))
      %E = @substr(%A,@sum(%C,1),@len(%A))
      %A = %D""%E
      End
  until @equal(@pos(<,%A),0)
  DIALOG SET,EDIT2,%A
  DIALOG SET,STATUS1,Stripping completed.
  goto evloop

:BUTTON3BUTTON

  goto evloop


I'm not sure all that works. It's been awhile since I played with this
example. Yes, it loops. It loops until it has gone through the entire
contents of %A and removed any html tags.

-Garrett
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Nov 26, 2002 9:53 pm    Post subject: Reply with quote

This isn't related to the problem at hand, but...

I think we should use a topic title that describes
the problem we're having...

"I dunno what to do..." isn't very helpful when
searching or scrolling thru old posts for info. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
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