---
title: "Jmail o Methods"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/10133-jmail-o-methods"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "aleborg"
published: "2001-06-16T13:01:00.000Z"
updated: "2001-06-19T14:12:00.000Z"
replies: 7
views: 300
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/10133-jmail-o-methods"
---

# Jmail o Methods

## #1 — aleborg, 2001-06-16T13:01Z

Sitter och testar JMail, hur funkar Methods egentligen och hur använder man det?

Permalänk: https://www.webforum.nu/p/10133

## #2 — aleborg, 2001-06-17T15:19Z

någon?

Permalänk: https://www.webforum.nu/p/275298

## #3 — Vide, 2001-06-17T16:26Z

Om du menar metoder som ".Execute" så kan man inte dra alla över en kant, dom bidrar alla till olika saker.

Kolla PatrikBs script under wF script: <http://script.webforum.nu/wf/Forum1/HTML/000008.html>

Permalänk: https://www.webforum.nu/p/275299

## #4 — aleborg, 2001-06-17T22:18Z

Jag menar som det här: <http://tech.dimac.net/isapiscript.dll?action=read&id=32584&refId=32592#DownloadHeaders> 

Hur använder jag dom funktionerna?

Permalänk: https://www.webforum.nu/p/275300

## #5 — aleborg, 2001-06-19T11:52Z

Nån?

Permalänk: https://www.webforum.nu/p/275301

## #6 — PatrikB, 2001-06-19T13:27Z

Hello,

skickar dig vidare till dimacs exempelsida: <http://tech.dimac.net/isapiscript.dll?action=read&id=32559> 

Har själv inte jobbat med JMail 4.o =( ...

cya,
PatrikB

Permalänk: https://www.webforum.nu/p/275302

## #7 — aleborg, 2001-06-19T13:44Z

Problemet är att det är mycket dåligt beskrivet på deras sida! Står inget om hur man använder Methods och det finns bara ett exempel :(

Permalänk: https://www.webforum.nu/p/275303

## #8 — aleborg, 2001-06-19T14:12Z

Den här koden finns på Dimac:

```
<%

Set pop3 = Server.CreateObject( "JMail.POP3" )

pop3.Connect "username", "password", "mail.mydomain.com"

Response.Write( "You have " & pop3.count & " emails in your mailbox!<br><br>" )

if pop3.count > 0 then
Set msg = pop3.Messages.item(1) 

' Note the first element of this array is 1
' since the POP3 server starts counting at 1
ReTo = ""
ReCC = ""

Set Recipients = msg.Recipients
separator = ", "

' We now need to get all the recipients,
' both normal and Carbon Copy (CC) recipients
' and store them in a variabel

For i = 0 To Recipients.Count - 1
  If i = Recipients.Count - 1 Then
    separator = ""
  End If

  Set re = Recipients.item(i)
  If re.ReType = 0 Then
    ReTo = ReTo & re.Name & "&nbsp;(" & re.EMail & ")" & separator
  else
    ReCC = ReTo & re.Name & "&nbsp;(" & re.EMail & ")" & separator
  End If
Next

' This function iterates through the Attachments object,
' and saves the attachment to the server's disk.
' It also returns a nicely formatted string with a
' link to the attachment.
Function getAttachments()
  Set Attachments = msg.Attachments
   separator = ", "

  For i = 0 To Attachments.Count - 1
    If i = Attachments.Count - 1 Then
      separator = ""
    End If

  Set at = Attachments(i)
  at.SaveToFile( "c:\attachments\" & at.Name )
  getAttachments = getAttachments & "<a href=""/attachments/" &_
  at.Name &""">" & at.Name & "(" & at.Size & " bytes)" &_
  "</a>" & separator
  Next
End Function

%>
<html>
<body>
<TABLE>
 <tr>
  <td>Subject</td>
  <td><%= msg.Subject %></td>
 </tr>
 <tr>
  <td>From</td>
  <td><%= msg.FromName %></td>
 </tr>
 <tr>
  <td>Recipients To</td>
  <td><%= ReTO %></td>
 </tr>
 <tr>
  <td>Recipients CC</td>
  <td><%= ReCC %></td>
 </tr>
 <tr>
  <td>Attachments</td>
  <td><%= getAttachments %></td>
 </tr>
 <tr>
  <td>Body</td>
  <td><pre><%= msg.Body %></pre></td>
 </tr>
</TABLE>
</body>
</html>
<%

end if

pop3.Disconnect

%>
```

Men hur gör jag för att få fram alla mails rubriker och göra dom klickbara så att man kan välja vilket man vill läsa?

Permalänk: https://www.webforum.nu/p/275304

---

Tråden på webben: https://www.webforum.nu/amne/asp/10133-jmail-o-methods
