G General

Email prim-to-prim Without 20 Second Delay Version 1.0

Email prim-to-prim Without 20 Second Delay
Details
Features
Contents
Reviews

Basically, for this write-up, I just copy-pasted the instructions notecard:

--------------
This is written to be incorporated in with your builds. The scripts are distributed FULL-PERM but it is not open shareware.You are expected to incorporate it into your builds before distribution. Furthermore, I ask that you make the email_server scripts no-mod upon your final build.

--------------
Initial Outline:

The primary purpose of this system is to circumvent the 20 second delay in the llEmail function. Basically, llEmail sends the email (first) and then delays (like an llSleep) for 20 seconds. To get around this we can simply use separate scripts to send our emails. Just one extra script allows our main script to continue without the delay.

However, if we wish to send multiple emails without waiting on the 20 second delay between each of them, we need a slightly more complex solution.

With this system, we create *several* email "server" scripts, and then use them in a round-robin fashion. Each "server" script will still have the 20 second delay. But, when we have several "servers", this delay won't be nearly as bothersome.

--------------
Demonstration:

In your folder, you should have an object named "Email Send/Receive". To test, rez TWO copies of this object, and then click one of them.

When you click it, you will be prompted for the UUID of the OTHER object. To get that, you can edit the other object, and then click the "Copy Keys" button on the General tab of the Edit window. Once you've done this, paste (Ctrl+V) it into the prompt, and click "Submit".

Then, click that first object again, and it'll send messages to the second object. You can also do the same thing back the other direction (sending messages from the second object to the first one).

Furthermore, all of this will work GRID WIDE! You will need a friend to help you to test across regions (or a test avatar). But region boundaries don't have any effect on emails.

--------------
Instructions:

To use in your own builds, you will only need the email_server script and the _Test_Sending_Emails_with_email_server script. But let's talk about the email_server script first.

You can't rename this email_server script, or things will break. However, you will need several copies of this script in your build. To do this, drag-copy it into your build several times. The more copies, the better ... but efficiencies seem to max out at about 40 copies. However, more copies doesn't hurt anything. When you're done making these drag-copies, your build's inventory might look something like the following:

    email_server
    email_server 1
    email_server 2
    email_server 3
    email_server 4
    email_server 5
    email_server 6
    email_server 7
    email_server 8
    email_server 9
    email_server 10
    email_server 11
    email_server 12
    ...

CAUTION: Don't try to copy-drag them more than one at a time. The numbering system MUST look exactly like the above. More than one space (between the script name and the number), any parentheses, or anything else will foul things up.

Now, let's talk about the _Test_Sending_Emails_with_email_server script. Basically, we need the SendEmailViaServers function, the SetHighEmailServer function, and the few associated global variables. We will place these in YOUR script that needs to SEND emails.

All you will need to use is the SendEmailViaServers function. Use it just like you'd use llEmail. However, it has an added feature that, if you have nothing but a UUID in the sAddress, it will append the "@lsl.secondlife.com" string. That's actually done down in the email_server scripts, so you don't actually see it in the SendEmailViaServers function.

That's about it. There is also a _Listen_To_Emails script. You're welcome to use that script in anyway you like, or you can write your own email reader. The emails are received via the email event, just like any email.

--------------
Notes & Limits:

* The LSL wiki has this statement in it regarding llEmail:

        The message field may have a maximum of 1000
        single-byte characters. This count includes the header
        information (address, subject, etc).

However, I've tried to test this, and I've gotten over 10,000 bytes into a message, and that's exclusive of the header, the subject, and the address. So, I'm not sure if they removed that restriction, or what.

* The LSL wiki also says this under llEmail:

        There is a limit of 500 messages from a single agent's
        objects in a one hour period.

I have not tested this.

* And, under the email event, the wiki says this:

        The email queue is limited to 100 emails,
        any email after that is bounced.

I haven't tested that one either. But basically, that's just saying that you should read your emails on a somewhat fast timer, and not just let them sit in the Linden server's queue.

--------------
Enjoy,
KyleFlynn