Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
StudipMail Class Reference

Public Member Functions

 __construct ($data=null)
 
 setSenderEmail ($mail)
 
 getSenderEmail ()
 
 setSenderName ($name)
 
 getSenderName ()
 
 setReplyToEmail ($mail)
 
 getReplyToEmail ()
 
 setReplyToName ($name)
 
 getReplyToName ()
 
 setSubject ($subject)
 
 getSubject ()
 
 addRecipient ($mail, $name= '', $type= 'To')
 
 removeRecipient ($mail)
 
 getRecipients ()
 
 isRecipient ($mail)
 
 addFileAttachment ($file_name, $name= '', $type= 'automatic/name', $disposition= 'attachment')
 
 addDataAttachment ($data, $name, $type= 'automatic/name', $disposition= 'attachment')
 
 addStudipAttachment (FileRef $file_ref)
 
 removeAttachment ($name)
 
 getAttachments ()
 
 isAttachment ($name)
 
 setBodyText ($body)
 
 getBodyText ()
 
 setBodyHtml ($body)
 
 getBodyHtml ()
 
 send (email_message_class $transporter=null)
 
 toArray ()
 
 setData ($data)
 

Static Public Member Functions

static setDefaultTransporter (email_message_class $transporter)
 
static getDefaultTransporter ()
 
static sendMessage ($recipient, $subject, $text, $html=null)
 
static sendAbuseMessage ($subject, $text)
 

Static Protected Member Functions

static quoteString ($string)
 

Detailed Description

StudipMail.class.php

class for constructing and sending emails in Stud.IP

Author
André Noack <noack-quest>, Suchi & Berg GmbH info@.nosp@m.data.nosp@m.-ques.nosp@m.t.de
Version
1 GPL2 or any later version

Constructor & Destructor Documentation

__construct (   $data = null)

sets some default values for sender and reply to from configuration settings. The return path is always set to MAIL_ABUSE

Member Function Documentation

addDataAttachment (   $data,
  $name,
  $type = 'automatic/name',
  $disposition = 'attachment' 
)
Parameters
$data
$name
$type
$disposition
Returns
StudipMail provides fluent interface
addFileAttachment (   $file_name,
  $name = '',
  $type = 'automatic/name',
  $disposition = 'attachment' 
)
Parameters
$file_name
$name
$type
$disposition
Returns
StudipMail provides fluent interface
addRecipient (   $mail,
  $name = '',
  $type = 'To' 
)
Parameters
$mail
$name
$type
Returns
StudipMail provides fluent interface
addStudipAttachment ( FileRef  $file_ref)
Parameters
FileRef$file_refThe FileRef object of a file that shall be added to a mail
Returns
StudipMail provides fluent interface
getAttachments ( )
Returns
array
getBodyHtml ( )
Returns
unknown_type
getBodyText ( )
Returns
unknown_type
static getDefaultTransporter ( )
static

gets the default transporter used in StudipMail::send()

Returns
email_message_class
getRecipients ( )
Returns
array
getReplyToEmail ( )
Returns
unknown_type
getReplyToName ( )
Returns
unknown_type
getSenderEmail ( )
Returns
string
getSenderName ( )
Returns
unknown_type
getSubject ( )
Returns
unknown_type
isAttachment (   $name)
Parameters
$name
Returns
unknown_type
isRecipient (   $mail)
Parameters
$mail
Returns
unknown_type
static quoteString (   $string)
staticprotected

quotes the given string if it contains any characters reserved for special interpretation in RFC 2822.

removeAttachment (   $name)
Parameters
$name
Returns
StudipMail provides fluent interface
removeRecipient (   $mail)
Parameters
$mail
Returns
StudipMail provides fluent interface
send ( email_message_class  $transporter = null)

send the mail using the given transporter object, or the set default transporter

Parameters
email_message_class$transporter
Returns
bool
static sendAbuseMessage (   $subject,
  $text 
)
static

convenience method for sending a qick, text based email message to the configured abuse adress

Parameters
string$subject
string$text
Returns
bool
static sendMessage (   $recipient,
  $subject,
  $text,
  $html = null 
)
static

convenience method for sending a qick, text based email message

Parameters
string$recipient
string$subject
string$textPlain text version of the message (required).
string$htmlHTML version of the message (optional).
Returns
bool
setBodyHtml (   $body)
Parameters
$body
Returns
StudipMail provides fluent interface
setBodyText (   $body)
Parameters
$body
Returns
StudipMail provides fluent interface
setData (   $data)
static setDefaultTransporter ( email_message_class  $transporter)
static

Sets the default transporter used in StudipMail::send()

Parameters
email_message_class$transporter
Returns
void
setReplyToEmail (   $mail)
Parameters
$mail
Returns
StudipMail provides fluent interface
setReplyToName (   $name)
Parameters
$name
Returns
StudipMail provides fluent interface
setSenderEmail (   $mail)
Parameters
string$mail
Returns
StudipMail provides fluent interface
setSenderName (   $name)
Parameters
string$name
Returns
StudipMail provides fluent interface
setSubject (   $subject)
Parameters
$subject
Returns
StudipMail provides fluent interface
toArray ( )

The documentation for this class was generated from the following file: