go-mail
[ class tree: go-mail ] [ index: go-mail ] [ all elements ]

Class: GoSwift

Source Location: /classes/mail/GoSwift.class.inc.php

Class Overview

Swift
   |
   --GoSwift

This class can be used to send an e-mail. It extends the 3rd party Swift class.


Author(s):

Version:

  • $Id: GoSwift.class.inc.php 1263 2008-10-27 16:35:59Z mschering $

Copyright:

  • Copyright Intermesh

Variables

Methods


Child classes:

GoSwiftImport
This class can be used to send an e-mail. It extends the 3rd party Swift class.

Class Details

[line 50]
This class can be used to send an e-mail. It extends the 3rd party Swift class.

Swift documentation can be found here:

Documentation

Tags:

author:  Merijn Schering <mschering@intermesh.nl>
version:  $Id: GoSwift.class.inc.php 1263 2008-10-27 16:35:59Z mschering $
copyright:  Copyright Intermesh
since:  Group-Office 3.0
uses:  Swift
license:  GNU


[ Top ]


Class Variables

$account =

[line 96]

The account record as an array. see table em_accounts

Tags:

access:  public

Type:   array


[ Top ]

$message =

[line 57]

The Swift message to send

Tags:

access:  public

Type:   Swift_Message


[ Top ]

$recipients =

[line 65]

The Swift recipients list

Tags:

access:  public

Type:   Swift_RecipientList


[ Top ]



Class Methods


constructor __construct [line 110]

GoSwift __construct( String $email_to, String $subject, [Int $account_id = 0], [String $priority = '3'], [ $plain_text_body = null])

Constructor. This will create a Swift instance and a Swift message public property.

Overridden in child classes as:

GoSwiftImport::__construct()

Parameters:

String   $email_to   The reciepents in a comma separated string
String   $subject   The subject of the e-mail
Int   $account_id   The account id from the em_accounts table. Used for smtp server and sent items
String   $priority   The priority can be 3 for normal, 1 for high or 5 for low.
   $plain_text_body  

[ Top ]

method get_data [line 232]

void get_data( [ $email_from = null], [ $name_from = null])

Parameters:

   $email_from  
   $name_from  

[ Top ]

method get_mime [line 217]

void get_mime( [ $email_from = null], [ $name_from = null])

Parameters:

   $email_from  
   $name_from  

[ Top ]

method link_to [line 347]

void link_to( $links)

Links the message to items in Group-Office. Must be called after send()

Parameters:

array   $links   Format Array(Array(link_id=>1, link_type=>1));

[ Top ]

method sendmail [line 258]

int sendmail( [String $email_from = null], [String $name_from = null], [boolean $batch = false])

Sends the email.

Tags:

return:  The number of successful recipients
throws:  Swift_ConnectionException If sending fails for any reason.

Parameters:

String   $email_from   The from e-mail address. If you don't supply this then you must supply the account_id to the constructor
String   $name_from   The from name. If you don't supply this then you must supply the account_id to the constructor
boolean   $batch   If you set this to true it will use the Swift batchSend method. See the swift docs.

[ Top ]

method set_body [line 181]

void set_body( String $body, [String $type = 'html'])

Sets the message body

Parameters:

String   $body   The message body in HTML or text
String   $type   Can be html or text

[ Top ]

method set_recipients [line 169]

void set_recipients( $recipientList)

Parameters:

   $recipientList  

[ Top ]

method set_reply_to [line 210]

void set_reply_to( String $reply_uid, String $reply_mailbox)

If this message is a reply to another message then you must supply the UID and the mailbox of the original message. The account id must be passed to the constructor for this to work.

Parameters:

String   $reply_uid  
String   $reply_mailbox  

[ Top ]

method set_to [line 155]

void set_to( $email_to)

Parameters:

   $email_to  

[ Top ]


Documentation generated on Thu, 30 Oct 2008 14:13:30 +0100 by phpDocumentor 1.4.0