Description
Gets operational log information to a file when sending an email.
This function takes no effect when sending an email asynchronously. You can use OnSendFinished to get the error log when sending an email asynchronously.
Applies to
Syntax
smtpclient.LogFile(string filepath{, boolean append})
Argument |
Description |
---|---|
smtpclient |
A SMTP client object identifying the client in which you want to get the operational log information to a file. |
filepath |
The file path that stores the obtained operational log information. If the file exists, the information will be appended to it. If not, the file will be created. |
append (optional) |
Specifies whether the log information will be appended to the file. Values are: True -- (Default) The log information will be appended to the file. False -- The log information will cover the content of the file. |
Return value
Integer.
Returns 1 if it succeeds and -1 if it fails.
Examples
The following example shows that the log information will be appended to the file.
lnv_SmtpClient.LogFile("c:\mail.log")
The following example shows that the log information will cover the content of the file.
lnv_SmtpClient.LogFile("c:\mail.log",False)
See also