livebox:gmail

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]
enable=1
server=smtp://smtp.gmail.com:587
from=job.blogs@gmail.com
fullname=Joe Blogs
password=mypassword

If you modify this file manually you'll need to restart the xap-mail daemon so it picks up these changes

/etc/init.d/xap restart mail

To send an email, construct a xAP packet of this form.

xap-header
{
v=12
hop=1
uid=FF00D800
source=dbzoo.livebox.test
target=dbzoo.livebox.Mail
class=email
}
message
{
to=mary.little@gmail.com
subject=How is your 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
{
v=12
hop=1
uid=FF00E100
class=email
source=dbzoo.livebox.Mail
}
mail.ok
{
text=Send mail is complete
}

The value of the error code in the response packet can be consulted at: http://curl.haxx.se/libcurl/c/libcurl-errors.html

  • livebox/gmail.txt
  • Last modified: 2014/06/12 11:24
  • by minerva9