« Back to Product

Documentation

SMTP_SendMailAttachmentEx

Require: IP-Symcon >= 2.2

 boolean SMTP_SendMailAttachmentEx (int $InstanceID, string $Recipient, string $Subject, string $Body, string $FilePath) 

Parameters

InstanceID

ID of the SMTP instance

Recipient

Recipient's e-mail address

Subject

Subject of the email

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 to recipients via the instance with the ID InstanceID. In contrast to the SMTP_SendMail function, the recipient can be specified explicitly in the function call.

Example

SMTP_SendMailAttachmentEx(12345, "me@example.com", "Alarm!", "The heater is down!", "media/webcam.jpg");
Any questions?