System information

Using scripts in Axis Camera/Video products
Axis Communications AB provides NO support for application development of any kind. The information
here is provided "as is", and there is no guarantee that any of the examples shown will work in your
particular application.
Revision 1.02 October 2002 17
3.4.3 smtpclient
This client is used for SMTP connections. You can send e-mail with attached files and specify a
range of common parameters, i.e.; subject, address of the sender for the replies, address to send
copy to , etc. A typical example is to send an e-mail with snapshots when an alert is detected.
Usage: smtpclient [options] recipients...
Option Description
-s <string> *
Subject line of message.
-f <addr> *
Address of the sender.
-r <addr>
Address of the sender for replies.
-e <addr>
Address to send delivery errors to.
-c <addr>
Address to send copy of message to.
-a <file>
The file to attach. Binary MIME attachment, if no mime encode is set,
MIME-style is set to
1 = application/octet.
-d
<directory>
Binary MIME directory attachment, if no mime encode is set, MIME-
style is set to 1 = application/octet. The entire contents of the
directory are uploaded.
-b <file> *
Read mail body from file. (CRLF must be used as the line feed).
-S <host>
Host where MTA can be contacted via SMTP.
-P <num>
Port where MTA can be contacted via SMTP.
-M
Use MIME-style translation to quoted-printable
1=application/octet, 2=image/jpeg.
-L
Log errors to syslog facility instead of stderr.
* = Required
Example
Send an e-mail entitled Alert from someone@somewhere.com via the SMTP server
mail.somewhere.com to the recipient somebody1@somewhere.com. Also send a copy to
somebody2@somewhere.com. The body will be read from the file /tmp/body and the files
included in the directory /tmp/SNAP1 will be attached to the mail.
smtpclient -s Alert -S $mail.somewhere.com -f someone@somewhere.com -c
somebody2@somewhere.com -b /tmp/body -M 2 -d /tmp/SNAP1
somebody1@somewhere.com