WriteSMTP
Sends an email message via an Simple Mail Transfer Protocol (SMTP) server, a protocol for sending email messages between servers.
The message can be sent with an image attached. Optionally, the image file may be a complete screen capture, including overlay graphics on top of the image.
- The cell state of the WriteSMTP function must be referenced to an Event or Button function. For more information, see Cell State Dialog.
- The WriteSMTP function requires the In-Sight sensor to be Online.
- If a memory-intensive job containing the function is executed repeatedly, the FTP command "Get image.jpg" (or .bmp) may fail because the vision system's memory becomes too fragmented. The job will continue to execute correctly.
- Jobs containing this function that are saved in In-Sight Explorer 3.3.0 or higher are only compatible with In-Sight Explorer 3.3.0 and higher.
WriteSMTP Inputs
Syntax: WriteSMTP(Event,SMTP Mail Server,To,Cc,From,Subject,Importance,Image Attachment,Image Name,Image Format,Screen Capture,Message Text,Message Text,Message Text,Message Text)
Parameter | Description | ||||
---|---|---|---|---|---|
Specifies the event that forces an update.This parameter must be a reference to one of the following:
Note: When the default
Event reference is deleted, the value is replaced by a checkbox. If another
cell is referenced as an event, the function will conditionally run based
on the referenced cell. If the checkbox is enabled, the function will
always run when any inputs to the function are updated. |
|||||
Host name or IP address of an SMTP server. Note:
|
|||||
Email address of the message recipient. |
|||||
Email address(es) of any alternate recipients. |
|||||
Sender of the message. |
|||||
Note: The To,
Cc, and From
values must be in the format "user@domain", and the domain must
be valid.
|
|||||
Subject text of the message. |
|||||
Importance of the message.
|
|||||
Sends an image as an attachment. |
|||||
File name of the attachment; the default is "Image". |
|||||
File format of the image that will be written out to the target host.
|
|||||
Specifies whether the image will be written to the remote host system with or without any graphic overlays (In-Sight 3400 only).
|
|||||
Specifies the message body text string to be written, or a reference to a cell containing the text. The function allows reference to four cells; each cell can hold up to 254 characters of text. |
WriteSMTP Outputs
Returns |
An SMTP data structure that will send an email message whenever the spreadsheet is updated. |
WriteSMTP Example
WriteSMTP($A$0,"mailserver@yourdomain.com.","recipient@yourdomain.com","copy@yourdomain.com","from@yourdomain.com","Message",1,0,"Image",0,0,"Image Sent", "","","")
Whenever the spreadsheet updates after the referenced Event function activates, this function sends an email message by way of an SMTP mail server. Here is an example of a WriteSMTP property sheet: