<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.mulesource.org/schema/mule/email/2.0"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:mule="http://www.mulesource.org/schema/mule/core/2.0"
            targetNamespace="http://www.mulesource.org/schema/mule/email/2.0"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xsd:import namespace="http://www.mulesource.org/schema/mule/core/2.0" 
                schemaLocation="http://www.mulesource.org/schema/mule/core/2.0/mule.xsd" />

    <xsd:complexType name="emailDownloadConnectorType">
        <xsd:complexContent>
            <xsd:extension base="mule:connectorType">
                <xsd:attribute name="backupEnabled" type="mule:substitutableBoolean">
                    <xsd:annotation>
                        <xsd:documentation>
                            Should we save copies to backupFolder (default is false)?
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="backupFolder" type="xsd:NMTOKEN">
                    <xsd:annotation>
                        <xsd:documentation>
                            The folder to which messages are moved when read.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="checkFrequency" type="mule:substitutableLong">
                    <xsd:annotation>
                        <xsd:documentation>
                            Period (ms) between poll connections to the server.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="mailboxFolder" type="xsd:NMTOKEN">
                    <xsd:annotation>
                        <xsd:documentation>
                            The folder to check for email.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="deleteReadMessages" type="mule:substitutableBoolean">
                    <xsd:annotation>
                        <xsd:documentation>
                            Whether or not to delete messages from the server when they have been downloaded.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:attributeGroup name="addressAttributes">
        <xsd:attribute name="user" type="xsd:string"/>
        <xsd:attribute name="password" type="xsd:string"/>
        <xsd:attribute name="host" type="xsd:string"/>
        <xsd:attribute name="port" type="mule:substitutablePortNumber"/>
    </xsd:attributeGroup>

    <xsd:element name="email-to-string-transformer" type="mule:abstractTransformerType" substitutionGroup="mule:abstract-transformer"/>
    <xsd:element name="string-to-email-transformer" type="mule:abstractTransformerType" substitutionGroup="mule:abstract-transformer"/>
    <xsd:element name="object-to-mime-transformer" type="mule:abstractTransformerType" substitutionGroup="mule:abstract-transformer"/>
    <xsd:element name="mime-to-bytes-transformer" type="mule:abstractTransformerType" substitutionGroup="mule:abstract-transformer"/>
    <xsd:element name="bytes-to-mime-transformer" type="mule:abstractTransformerType" substitutionGroup="mule:abstract-transformer"/>

</xsd:schema>
