?
Solved

How to check email with vbscript using chilisoftASP POP3 component....

Posted on 2001-08-30
12
Medium Priority
?
332 Views
Last Modified: 2008-03-17
need to read message and show who from...

anybody out there? Chilisoft has very poor pdf docs on this subject...

Thanks
0
Comment
Question by:zerogravity187
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
  • 2
  • +1
12 Comments
 
LVL 18

Expert Comment

by:mgfranz
ID: 6441735
You could do this with Exchange 2000 and IIS5 but not with ChiliSoft...
0
 

Author Comment

by:zerogravity187
ID: 6441797
Well, then what is the SpicePak POP3 component for?

here is a simple jscript example:

<% @ LANGUAGE=JScript %>
<html>
<body>
<h1>hello <%=Request.Form('user')%>, here is your mail</h1>
<table border>
<%
  pop3 = Server.CreateObject("CHILI.POP3.1");
  pop3.Connect("mail.jumpbacks.com",
            Request.Form('user'),
               Request.Form('password'));
  for (var i=0; i<pop3.Messages.Count; i++) {
     var mess = pop3.Messages(i);
 %>
     <tr><th>From</th><th><%=mess.From%></th></tr>
     <tr><th>To</th><th><%=mess.To%></th></tr>
     <tr><th>CC</th><th><%=mess.CC%></th></tr>
     <tr><td>Subject</td><td><%=mess.Subject%></td></tr>
     <tr><td>DateSent</td><td><%=mess.DateSent%></td></tr>
     <tr><td>10 lines of message</td><td><pre><%=mess.PreviewMessage(10)%></pre></td></tr>
     <tr><td>Attachments</td><td><table border>
<%
      for (var j = 0; j<mess.Attachments.Count; j++) {
 %>
         <tr><td><%=j%></td><td><%=mess.Attachments[j].Read()%></td></tr>
<%
      }
 %>
     </table></td></tr>
<%
  }
  pop3.Disconnect();
 %>
</table>
</body>
</html>
0
 

Author Comment

by:zerogravity187
ID: 6441800
will repost....
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:zerogravity187
ID: 6441803
will repost....
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6441865
Are you asking or telling???

The Chili!Pop3 1.0 Control enables users retrieve messages from a POP3 server using ASP scripts. This component has two main interfaces. The first, the POP3 interface, deals with the message collection by retrieving messages and controlling messages from a POP3 server. The second interface, the Message interface, exposes all of the properties of a single message. Additional interfaces are exposed to support retrieval of message lists and message attachments.
0
 

Author Comment

by:zerogravity187
ID: 6442180
I am asking, I can do it in jscript, but having trouble in vbscript... All I need to do is be able to recurse through the unread mail, read in the text of the body for parsing into a csv for database, remove the msgs off the server, and be able to parse the subject--attachments are not necessary.
0
 

Expert Comment

by:davebeer
ID: 6442394
What? Are you having difficulty converting that example to VBScript?

Does it work using JScript?
0
 

Author Comment

by:zerogravity187
ID: 6442516
well, It does work, but I just dont have time to re-engineer it to vbscript...  somebody should write a script that can do that :)

Thanks for the input - If somebody can get it, I will increase the points....
0
 

Author Comment

by:zerogravity187
ID: 6442827
I am asking, I can do it in jscript, but having trouble in vbscript... All I need to do is be able to recurse through the unread mail, read in the text of the body for parsing into a csv for database, remove the msgs off the server, and be able to parse the subject--attachments are not necessary.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6444053
Well, if you want it in VBscript:

<% @ LANGUAGE="VBScript" %>
<html>
<body>
<h1>hello <%=Request.Form("user")%>, here is your mail</h1>
<table border>
<%
 Set pop3 = Server.CreateObject("CHILI.POP3.1");
 pop3.Connect("mail.jumpbacks.com", _
           Request.Form("user"), _
              Request.Form("password"))
 For i = 0 To pop3.Messages.Count - 1
    mess = pop3.Messages(i)
%>
    <tr><th>From</th><th><%=mess.From%></th></tr>
    <tr><th>To</th><th><%=mess.To%></th></tr>
    <tr><th>CC</th><th><%=mess.CC%></th></tr>
    <tr><td>Subject</td><td><%=mess.Subject%></td></tr>
    <tr><td>DateSent</td><td><%=mess.DateSent%></td></tr>
    <tr><td>10 lines of message</td><td><pre><%=mess.PreviewMessage(10)%></pre></td></tr>
    <tr><td>Attachments</td><td><table border>
<%
     for j = 0 To mess.Attachments.Count - 1
%>
        <tr><td><%=j%></td><td><%=mess.Attachments[j].Read()%></td></tr>
<%
     Next
%>
    </table></td></tr>
<%
 Next
 pop3.Disconnect()
%>
</table>
</body>
</html>

And that should do you!!!
0
 

Author Comment

by:zerogravity187
ID: 6445610
alfanomore, nice work...there were some small bugs...did you test out the script first? Here is the fully working script with no errors (to my knowlege):

<% @ LANGUAGE="VBScript" %>
<html>
<body>
<h1>hello <%=Request.Form("user")%>, here is your mail</h1>
<table border>
<%
Set pop3 = Server.CreateObject("CHILI.POP3.1")
pop3.connect "mail.jumpbacks.com",request.form("user"),Request.Form("password")
For i = 0 To pop3.Messages.Count - 1
   mess = pop3.Messages(i)
%>
   <tr><th>From</th><th><%=mess.From%></th></tr>
   <tr><th>To</th><th><%=mess.To%></th></tr>
   <tr><th>CC</th><th><%=mess.CC%></th></tr>
   <tr><td>Subject</td><td><%=mess.Subject%></td></tr>
   <tr><td>DateSent</td><td><%=mess.DateSent%></td></tr>
   <tr><td>10 lines of message</td><td><pre><%=mess.PreviewMessage(10)%></pre></td></tr>
   <tr><td>Attachments</td><td><table border>
<%
    for j = 0 To (mess.Attachments.Count - 1)
%>
       <tr><td><%=j%></td><td><%=(mess.Attachments(j).Read())%></td></tr>
<%
    Next
%>
   </table></td></tr>
<%
Next
pop3.Disconnect()
%>
</table>
</body>
</html>

0
 
LVL 9

Accepted Solution

by:
AlfaNoMore earned 300 total points
ID: 6445637
No testing... Just a good guess!!!

Accept my answer then, and we'll all have a nice weekend!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question