Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
livebox:gmail [2014/05/12 01:24] – created brett | livebox: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. | The xap-mail daemon allows you to send an xAP message and have it redirected to a mailbox. | ||
- | The structure | + | {{: |
+ | |||
+ | Configuration is via the GUI however manual configuration | ||
+ | < | ||
+ | [mail] | ||
+ | enable=1 | ||
+ | server=smtp:// | ||
+ | from=job.blogs@gmail.com | ||
+ | fullname=Joe Blogs | ||
+ | password=mypassword | ||
+ | </ | ||
+ | |||
+ | If you modify this file manually you'll need to restart | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | To send an email, construct a xAP packet of this form. | ||
< | < | ||
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 |
} | } | ||
</ | </ | ||
- | When it successful sends the email it will send a OK packet | + | You will get an mail.ok payload response on success and a mail.error on failure. |
< | < | ||
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> |
- | An error packet with a status code will be send otherwise. | + | The value of the error code in the response packet |