This is an old revision of the document!
xAP message via Gmail
The xap-mail daemon allows you to send an xAP message and have it redirected to a mailbox. This is useful for monitoring and alerts.
Configuration is via the GUI however manual configuration of the /etc/xap.d/xap-mail.ini file is supported. A typical setup for gmail would look like this:
[mail] server=smtp://smtp.gmail.com:587 from=job.blogs@gmail.com fullname=Joe Blogs password=mypassword
To send an email construct a xAP packet of this form.
xap-header { target=dbzoo.livebox.Mail class=email } message { to=mary.little@gmail.com subject=How is you lamb? text=I'll be around for dinner tonight at 6pm }
You will get an mail.ok payload response on success and a mail.error on failure.
xap-header { class=mail source=dbzoo.livebox.Mail } mail.ok { text=Send mail is complete }
An error packet with a status code will be send otherwise. The value of the error can be consulted at: http://curl.haxx.se/libcurl/c/libcurl-errors.html