mn8 Language Reference | Index    

SMTPHandler

SUMMARY: NO ATTRIBUTES  NO ELEMENTS  CONSTRUCTORS SUMMARY  NO OPERATORS  METHODS SUMMARYDETAIL: NO ATTRIBUTES  NO ELEMENTS  CONSTRUCTOR DETAILS  NO OPERATORS  METHOD DETAILS

Description

SMTPHandler encapsulates all the functionality necessary to send files through an SMTP server. This concept is able to connect and send message to SMTP server.

URL format is : smtp://<hostName>/

Possible options :

Usage

This example get a message form POP3 server and send it to SMTP server.

            $x from "pop3://hostName/retrieve?id=ID" options "user"="userName","pwd"="passwd"
            $x to "smtp://hostName/"
        

Version: 0.1
Authors:Szabo Csaba
Inherits: Concept, URIHandler

Constructor List

create (String $url)
top

Method List

static LogicalacceptsURI (String $uri)
LogicalcloseConnection
ConceptgetContent
Logicalinitialize (Map $options)
LogicalopenConnection
LogicalsetContent (Concept $value)
top
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getConceptsAtPath, getErrorHandler, getInheritedConcepts, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML
Methods inherited from: URIHandler
acceptsURI, closeConnection, getContent, initialize, openConnection, setContent

Detailed Constructor Info

create (String $url)
Parameters:
$url :The url with which this SMTPHandler will be created.

Creates a new SMTPHandler concept with the given $url.

top

Detailed Method Info

static acceptsURI (String $uri)
Parameters:
$uri :The uri which will be tested if it is acceptable by this handler.
Returns: Logical

Returns true if the given $uri is acceptable by this handler, false otherwise.

top
closeConnection
Returns: Logical

Returns true if the closing of this connection was successfull, false otherwise.

top
getContent
Returns: Concept

Return false.

top
initialize (Map $options)
Parameters:
$options : Contains a filter with which the returned content will be filtered.
Returns: Logical

Returns true if the SMTPHandler was initilized successfully, false otherwise.

top
openConnection
Returns: Logical
Exceptions:
missingHost :
(Error)
If missing the host name for SMTP connection.
connectionRefuzed :
(Error)
If the SMTP server refuzed connection.
loginFailed :
(Error)
If login failed to SMTP server.
badURL :
(Error)
If the URL is not valid..

Returns true if the connection can be establised with the remote server from this concept's url, false otherwise.

top
setContent (Concept $value)
Parameters:
$value :The value to be set.
Returns: Logical
Exceptions:
sendFailed :
(Error)
If unable to send message to SMTP server.

Sets this SMTPHandler content to the specified $value.

top