livebox:gmail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
livebox:gmail [2014/05/12 01:24] – created brettlivebox:gmail [2014/06/12 11:24] (current) minerva9
Line 3: Line 3:
 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. 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.
  
-The structure of xAP packet that can be intercepted by the xap-mail daemon.+{{:livebox:mail-tab.png?nolink|}} 
 + 
 +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: 
 +<code> 
 +[mail] 
 +enable=1 
 +server=smtp://smtp.gmail.com:587 
 +from=job.blogs@gmail.com 
 +fullname=Joe Blogs 
 +password=mypassword 
 +</code> 
 + 
 +If you modify this file manually you'll need to restart the xap-mail daemon so it picks up these changes 
 +<code> 
 +/etc/init.d/xap restart mail 
 +</code> 
 + 
 +To send an email, construct a xAP packet of this form.
 <code> <code>
 xap-header xap-header
 { {
-target=dbzoo.wombat.Mail+v=12 
 +hop=1 
 +uid=FF00D800 
 +source=dbzoo.livebox.test 
 +target=dbzoo.livebox.Mail
 class=email class=email
 } }
 message message
 { {
-to=brett@dbzoo.com +to=mary.little@gmail.com 
-subject=Email test +subject=How is your lamb? 
-text=From wombat+text=I'll be around for dinner tonight at 6pm
 } }
 </code> </code>
  
-When it successful sends the email it will send OK packet+You will get an mail.ok payload response on success and mail.error on failure.
 <code> <code>
 xap-header xap-header
 { {
-class=mail +v=12 
-source=dbzoo.wombat.Mail+hop=1 
 +uid=FF00E100 
 +class=email 
 +source=dbzoo.livebox.Mail
 } }
 mail.ok mail.ok
Line 29: Line 53:
 text=Send mail is complete text=Send mail is complete
 } }
-<code>+</code>
  
-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+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.1399857898.txt.gz
  • Last modified: 2014/05/12 01:24
  • by brett