XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum [Powered by Invision Power Board]
Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > Documentation and Knowledge Base > Mail Pickup Folder


Posted by: davidM Aug 18 2003, 11:48 AM
Hello
I am neewbee with Xmail
I try to enqueue my mails with JMail component.
Emails are created in the directory I specify... but no email are send.so my question is :
is there an PICKUP directory for XMAIL ?
here is the code that does not work
thanks for your help
regards
daivd

<%@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\). <<< Is this not the pblme ?



Message.MSPickupDirectory = "c:\inetpub\mailroot\pickup\"
Message.nq
%>

so : mails are created but not sent
config : W2000 Server, Jmail, XMail all services seems to be started

Posted by: hschneider Aug 18 2003, 11:54 AM
QUOTE

XMAIL LOCAL MAILER

    XMail has the ability to deliver locally prepared mail files that if
    finds in the 'spool/local' directory. The format of these files is
    strict:

     mail from:<...>[CR][LF]
     rcpt to:<...>[CR][LF]
     ...
     [CR][LF]
     message text with [CR][LF] line termination

    All lines must be [CR][LF] terminated, with one mail-from statement, one
    or more rcpt-to statements, an empty line and the message text. Mail
    files must not be created directly inside the '/spool/local' directory
    but instead inside '/spool/temp' directory. When the file is prepared it
    has to be moved into '/spool/local'. The file name format is:

     stime-seqnr.pid.hostname

    where:

    stime
        system time in sec from 01/01/1970.

    seqnr
        sequence number for the current file.

    pid process or thread id.

    hostname
        creator process host name.

    Example:

     97456928-001.7892.home.bogus

    XMail has a number of LMAIL threads that periodically scan the
    '/spool/local' directory watching for locally generated mail files. You
    can tune this number of threads with the '-Ln nthreads' command line
    option. The suggested number ranges from three to seven.



Because of its naming convention not easy to use in practice. But once you scripted your pickup writer function, it should do its job.


Posted by: davidM Aug 18 2003, 12:37 PM
thanks
just tried.
in fact email are automaticcaly created and are named like :
13E66E0A2D5B47FE8F5FDD4972F29056.eml for the test I made.
This email was created in the temp directory but never was moved to the local one.
And when i moved it manually to the local directory it disappeared but was never sent.
In fact it is impossible to rename manually all email if I want to make a Mailing list manager
Any idea ?
thanks
david

Posted by: hschneider Aug 18 2003, 12:44 PM
It was never sent, due to wrong naming convention.

The only solution yet is a scheduled script which does moving and renaming for you. This really needs improvement ...


Posted by: davidM Aug 18 2003, 12:47 PM
ok
does it work better with IIS SMTP service ?
david

Posted by: hschneider Aug 18 2003, 12:56 PM
Indeed - it does ! blink.gif

QUOTE

The SMTP service in IIS is completely directory based. The SMTP installation creates the following directory structure in the \inetpub\mailroot directory:

BADMAIL—This directory stores messages that the SMTP service can't deliver. Look here first when you're debugging problems related to the structural format of the mail messages.

DROP—This directory holds all mail for your SMTP service. Each file in this directory represents one email message. Unfortunately, you can't determine the name and address of the sender and receiver from the structure of the filename.

PICKUP—As soon as a mail message goes into this directory, the SMTP service picks it up and either delivers it to the Drop directory or sends it to the SMTP service for the destination domain.

QUEUE— If the SMTP service can't deliver a message immediately because of a network problem or other connectivity problem, the message queues in the Queue directory. The SMTP service holds the message for a configurable length of time, then tries to retransmit it a configurable number of times.

ROUTE, SORTTEMP, and MAILBOX—The SMTP service uses these directories to sort and rearrange outgoing messages so that it can make their delivery more efficient. If several messages are going to the same remote host, IIS tries to send them all by using a single connection instead of transmitting each one individually by reconnecting multiple times.

You can use Notepad to create a properly formatted email message, then copy the message to the Pickup directory. As soon as the message is in the Pickup directory, the IIS SMTP service tries to deliver it. Adding this feature to your Web applications makes sending mail as easy as creating a text file and copying it to the \mailroot\pickup directory.

To create a file for the \mailroot\pickup directory that the IIS SMTP service will deliver, use this format:

  x-sender: TimHuck@InterKnowlogy.com
  x-receiver: WoodyP@InterKnowlogy.com
  From: TimHuck@InterKnowlogy.com
  To: WoodyP@InterKnowlogy.com
  Subject: Test Email

This is a test. This is the body of the message.

Don't forget to insert a blank line between the header and the message text.



Just decided to create a workaround for this. But I have no free resources at the moment, so if you urgently need an out of the box solution for your project, you should switch to IIS (Ouch that hurts ...). Maybe you come back later, when my Pickup Manager is available ... wink.gif

Posted by: davidM Aug 18 2003, 01:00 PM
ok thanks
it is not so urgent
so I try to make other tests while waiting your solution.
good luck
regards
david

Posted by: hschneider Aug 18 2003, 01:05 PM
Fine - I'll let you know when it is finished.

Posted by: davidM Aug 18 2003, 01:20 PM
ok thanks
in fact I try to create a mailing list manager wich could send thousands of email in one click for the user.
So I need queuing mails.
;o)
regards
david

Posted by: hschneider Aug 18 2003, 02:36 PM
I checked it out: There is no need for a 3rd party application!

- XMail accepts ANY naming convention (the manual is out of date here), even your 2423252523452345345.eml files.
- The header must be structured as follows:

CODE

    mail from:<...>[CR][LF]
    rcpt to:<...>[CR][LF]
    [CR][LF]
    From:<...>
    To:<...>
    Subject:.....
    ...
    [CR][LF]
    message text with [CR][LF] line termination


Take care for the blank line between envelope and header. This is not explictly mentioned in the manual!

- Prepare the mails in a temp folder and move them to spool/local.

All this was approved with XMail 1.16, so it might fail with prior versions.
I think Davide fixed this in the past, but missed to announce it...

XMail automatically queues all mail for you. The local mailer folder is emptied in a few seconds.

Posted by: hschneider Aug 18 2003, 03:18 PM
Reported the manual issue to Davide ...

Posted by: davidM Aug 29 2003, 01:58 PM
thanks
But I can move email manually
it can not be done by ASP
so no solution ?
thnaks
david

Posted by: hschneider Aug 29 2003, 04:57 PM
Ahem .. I don't catch your point - still a problem with it ?

Posted by: davidM Aug 29 2003, 05:08 PM
in fact I succeeded just few minutes ago to make work :
xmail & smt virtual server
so now, all working fine, emails are sent
thanks
regards
david

Posted by: hschneider Aug 29 2003, 09:55 PM
OK -- fine. Thanks 4 the feedback ...

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)