« Back to Product

Documentation

SMTP_SendMailAttachment

Require: IP-Symcon >= 2.2

 boolean SMTP_SendMailAttachment (int $InstanceID, string $Subject, string $Body, string $FilePath) 

Parameters

InstanceID

ID of the SMTP instance

Subject

Email subject

Body

Content of the email. Sent as HTML (since 7.0) if <html> and </html> is found, otherwise as text

FilePath

Path to the file

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

Sends an email with the subject, attachment and text via the instance with the ID InstanceID.

Warning

The recipient specified in the properties page will be used. If different recipients are to be addressed, the SMTP_SendMailAttachmentEx function should be used.

Example

SMTP_SendMailAttachment(12345, "Alarm!", "The heater is down!", "media/webcam.jpg");
Any questions?