Was this page helpful?

EmailService

    Assembly: mindtouch.dream
    Class: MindTouch.Dream.Services.EmailService
    SID: sid://mindtouch.com/2009/01/dream/email

    Overview

    The Email Service is a simple interface for allowing other services to send smtp email.

    Verb:Suffix Description
    POST:message Send an email message
    PUT:configuration/{configuration} Register custom smtp server configuration
    DELETE:configuration/{configuration} De-register custom smtp server configuration

     

    Data Types

    Config

    <smtp>
        <!-- defaults to localhost -->
        <smtp-host>...</smtp-host>
    
        <!-- defaults to standard smtp for plain or ssl communiction -->
        <smtp-port>...</smtp-port>
    
        <!-- skips smtp authentication if either is missing -->
        <smtp-auth-user>...</smtp-auth-user>
        <smtp-auth-password>...</smtp-auth-password>
    
        <!-- use ssl to talk to smtp server -->
        <use-ssl>true|false</use-ssl>
    </smtp>

    Email

    <email configuration="{optional configuration key}">
        <!-- an email document can optionally inject headers into the message to be sent -->
        <headers>
            <header>
                <name>...</name>
                <value>...</value>
            </header>
            ...
        </headers>
        <subject>...</subject>
        <from>...</from>
        <!-- one or more recipient email addresses -->    
        <to>...</to>  
        ...
    
        <!-- there can be up to two bodies, one the for a plain text body and the other for an html body -->
        <body html="(true|false)">
        ...
        </body>
        ...
    </email>

     

    Features

    POST:message

    Send an email via the configured Smtp server

    Access: Internal
    Request body

    The body is assumed to be an Xml document conforming to the above email specification

    Response
    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) none request could not be completed, because of invalid data in the request
    Unauthorized (401) none request could not be completed, because of invalid or missing authorization headers
    Response body

    None

    PUT:configuration/{configuration}

    Register custom smtp server configuration

    Access: Internal
    Request body

    The body is assumed to be an Xml document conforming to the config specification

    Response
    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) none request could not be completed, because of invalid data in the request
    Unauthorized (401) none request could not be completed, because of invalid or missing authorization headers
    Response body

    None

    DELETE:configuration/{configuration}

    De-register custom smtp server configuration

    Access: Internal
    Response
    Response Response Body Description
    Ok (200) none
    operation completed successfully and a new event was created
    Bad Request (400) none request could not be completed, because of invalid data in the request
    Unauthorized (401) none request could not be completed, because of invalid or missing authorization headers
    Response body

    None

     

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by