---
title: "Jmail-problem"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/44414-jmail-problem"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "timedia"
published: "2002-05-23T13:45:52.000Z"
updated: "2002-05-23T14:22:22.000Z"
replies: 6
views: 244
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/44414-jmail-problem"
---

# Jmail-problem

## #1 — timedia, 2002-05-23T13:45Z

Har ett nyhetsbrev som jag vill försöka med:

```
"jmail"
		set mlmsend = Server.CreateOBject( "JMail.Message" )
		mlmsend.Logging = true
		mlmsend.silent = true
		mlmsend.From = from
		mlmsend.FromName = myname
		mlmsend.AddRecipient from
		while not rsm.eof
		mlmsend.AddRecipientbcc rsm("email")
		rsm.movenext
		wend
		rsm.close
		mlmsend.Subject = subject
		mlmsend.body = message
		if not mlmsend.Send (rscfg("mailserver")) then
    	Response.write "<pre>" & mlmsend.log & "</pre>"
		else
    	Response.write "<center>" & "Message sent succesfully!" & "</center>" & "<br>"
		end if
```

Tyvärr blir det så här:

```
Microsoft VBScript runtime error '800a000d' 

Type mismatch: 'mlmsend.AddRecipientbcc' 

/maillist/sendit.asp, line 65
```

Rad 65 är mlmsend.AddRecipientbcc rsm("email") 
förklaring av rsm: sqlm = "select email from list"
set rsm = conn.execute (sqlm)

Vad funkar inte?
..följdfråga: hur får jag den att skicka 100, sen en knapp som säger 'skicka nästa 100´ ?

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

## #2 — @nders, 2002-05-23T13:48Z

Vad innehåller rsm("email")?  Kan den vara null? Kontrollera det först.

```
if not isnull(rsm("email")) then mlmsend.AddRecipientbcc rsm("email")
```

Mvh,

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

## #3 — Jesper T, 2002-05-23T13:48Z

Vad med:

```
mlmsend.AddRecipientbcc & rsm("email")
```

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

## #4 — Jesper T, 2002-05-23T13:50Z

> ..följdfråga: hur får jag den att skicka 100, sen en knapp som säger 'skicka nästa 100´ ?

 
Det har varit uppe förut ett antal gånger, prova att sök : skicka AND jmail

MVH Jesper

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

## #5 — timedia, 2002-05-23T13:52Z

Hej Anders och tack för snabbt svar :)

Glömde föklaring av rsm, men redigerade inlägget ovan.

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

## #6 — LAMP, 2002-05-23T13:53Z

Prova lägga till **mlmsend.LazySend = True** för att slippa server script timeout.

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

## #7 — doggelito, 2002-05-23T14:22Z

taget från <https://www.dimac.se>

```
When sending massive amounts of emails, you will need to
use the mail queue instead of sending them at once, or else your ASP will time out. 
This example shows how you use the nq 
method instead of the send() method. 
We only send a single email here, but you will get the picture. 

 
   jmailnq.asp

<%@LANGUAGE="VBSCRIPT" %>
<%

' Example on how to use queueing

' The message is set up as usual...
set Message = Server.CreateObject( "JMail.Message" )

Message.From = "janeway@voyager.com"
Message.Subject = "Testing"
Message.Body = "This is a test mail"
Message.AddRecipient "commander@enterprise.com","Jean Luc"

' Instead of using the Send() method, we use nq
' The email will be placed in the mail queue and sent
' as soon as the mailservice picks it up.
' We do not need to specify a mailserver, as the
' mailservice does all that for us.

' What we do need to do is to specify where the MS pickup
' directory is. If you are running w3 JMail on a
' Windows 2000 server, this is not neccessary, otherwise

' Unless you are running windows 2000 on your webserver,
' you will need to specify where the MS pickup directory
' is (c:\inetpub\mailroot\pickup\).

Message.MSPickupDirectory = "c:\inetpub\mailroot\pickup\"
Message.nq
%>
<HTML>
<BODY>
Email enqued! </BODY>
</HTML>
```

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/44414-jmail-problem
