LlEmail

来自人工智能助力教育知识百科
Mkx讨论 | 贡献2020年4月13日 (一) 03:19的版本 (创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: llEmail( string address, string subject, string message )…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: llEmail( string address, string subject, string message );
参数: string address

string subject

string message

返回值:Sends an email to address with subject and message.
注意事项
This function causes the script to sleep for 20.0 seconds.

There is a limit to the number of email messages an object can send in a given amount of time.

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

The 4096 byte size limit includes the subject line and automatically added text. The practical maximum body size is approximately 3600 bytes.

(Sept-2008) The Email Throttle was modified slightly, Per Prospero Linden's comments: "there has long been a throttle that makes a single script sleep for 20 seconds after sending an email. The new throttle is per user... some were using many, many different scripts to send spam. (the new throttle applies) when the destination is outside of Second Life. I know that messages within the same region were not throttled (beyond the 20-second delay), and I *believe* that messages between different sims were not throttled (between the 20-second delay)."

Due to the bug SVC-23 (present since 2005), objects may stop receiving emails completely until either the region is restarted or the object crosses a region boundary (resetting the script doesn't help). Emails sent may eventually be received after a restart/region-cross. Hence, don't rely on this function for reliable inter-region messaging.

Due to the bug SVC-391 llEmail will silently fail (no mail will arrive) when non-ascii characters are present in the subject. However, non-ascii characters in the message body will be replaced by "?".

示例
示例1
string emailAddress = "somebody@example.com";
string emailHeader = "Someone touched me!";
 
 
default
{
    touch_start(integer num_detected)
    {
        // llSay(PUBLIC_CHANNEL, "Sending eMail report now, this will take ~20 seconds.");
 
        key id = llDetectedKey(0);
        string name = llDetectedName(0);
 
        llEmail(emailAddress, emailHeader,
            "I was touched by: '" + name + "' (" + (string)id + ").");
 
        // llSay(PUBLIC_CHANNEL, "Email has been sent.");
    }
}
相关函数
llGetNextEmail

llMessageLinked

相关事件
email

link message