OnSendComplete Event
Fires when an email has been sent.
Syntax
EmailJob.OnSendComplete = handler
|
Parameters
res |
Long value that contains the error message. |
msg |
String that contains the final message. |
Remarks
The object that caused the event can be referenced in the event function using "this".
Examples
The following example shows returned messages when the email has been sent.
<div id="id_complete">sending...</div>
<div id="id_msgs"></div>
<SCRIPT TYPE="text/javascript">
window.external.InitScriptInterface();
function OnSendComplete(res, msg)
{
id_complete.innerHTML = "Send complete.";
dis = "Error message: " + res + ", final message: " + msg;
id_msgs.innerHTML = dis;
}
mymail = SiteKiosk.Email.CreateJob(false);
mymail.OnSendComplete = OnSendComplete;
mymail.POPServer = "mypopserver.com";
mymail.POPPort = 110;
mymail.Username = "myusername";
mymail.Password = "mypassword";
mymail.SMTPServer = "mysmtpserver.com";
mymail.SMTPPort = 25;
mymail.Authentication = 2;
mymail.SetSender("me@myserver.com", "My name");
mymail.AddRecipient("recipient@server.com");
mymail.Subject = "This is the subject.";
mymail.PlainBody = "This is the content.";
mymail.Send(0, false, true);
</SCRIPT>
|
Applies to
SiteKiosk v5.0 (and later versions).
Back to top