t3lib_formmail Klassenreferenz

Klassendiagramm für t3lib_formmail:
t3lib_htmlmail

Aufstellung aller Elemente

Öffentliche Methoden

 start ($V, $base64=false)
 addAttachment ($file, $filename)
 sanitizeHeaderString ($string)
 t3lib_htmlmail ()
 start ()
 useQuotedPrintable ()
 useBase64 ()
 use8Bit ()
 encodeMsg ($content)
 addPlain ($content)
 addAttachment ($file)
 addHTML ($file)
 extractHtmlInit ($html, $url)
 send ($recipient)
 setHeaders ()
 setRecipient ($recipient)
 getHTMLContentType ()
 setContent ()
 constructMixed ($boundary)
 constructHTML ($boundary)
 constructAlternative ($boundary)
 constructHTML_media ($boundary)
 sendTheMail ()
 getBoundary ()
 setPlain ($content)
 setHtml ($content)
 add_header ($header)
 add_message ($msg)
 getContent ($type)
 preview ()
 fetchHTML ($file)
 fetchHTMLMedia ()
 extractMediaLinks ()
 extractHyperLinks ()
 extractFramesInfo ()
 substMediaNamesInHTML ($absolute)
 substHREFsInHTML ()
 substHTTPurlsInPlainText ($content)
 fixRollOvers ()
 makeBase64 ($inputstr)
 getExtendedURL ($url)
 addUserPass ($url)
 getURL ($url)
 getStrippedURL ($url)
 getMimeType ($url)
 absRef ($ref)
 split_fileref ($fileref)
 extParseUrl ($path)
 tag_regex ($tags)
 get_tag_attributes ($tag)
 quoted_printable ($string)
 convertName ($name)

Öffentliche Attribute

 $reserved_names = 'recipient,recipient_copy,auto_respond_msg,redirect,subject,attachment,from_email,from_name,replyto_email,replyto_name,organisation,priority,html_enabled,quoted_printable,submit_x,submit_y'
 $dirtyHeaders = array()
 $recipient = ''
 $recipient_copy = ''
 $subject = ''
 $from_email = ''
 $from_name = ''
 $replyto_email = ''
 $replyto_name = ''
 $organisation = ''
 $priority = 3
 $mailer = ''
 $alt_base64 = 0
 $alt_8bit = 0
 $jumperURL_prefix = ''
 $jumperURL_useId = 0
 $mediaList = ''
 $http_password = ''
 $http_username = ''
 $postfix_version1 = false
 $theParts = array()
 $messageid = ''
 $returnPath = ''
 $Xid = ''
 $dontEncodeHeader = false
 $headers = ''
 $message = ''
 $part = 0
 $image_fullpath_list = ''
 $href_fullpath_list = ''
 $plain_text_header = ''
 $html_text_header = ''
 $charset = ''
 $defaultCharset = 'iso-8859-1'

Dokumentation der Elementfunktionen

t3lib_htmlmail::absRef ( ref  )  [inherited]

Returns the absolute address of a link. This is based on $this->theParts["html"]["path"] being the root-address

Parameter:
string $ref: address to use
Rückgabe:
string the absolute address
t3lib_htmlmail::add_header ( header  )  [inherited]

Adds a header to the mail. Use this AFTER the setHeaders()-function

Parameter:
string $header: the header in form of "key: value"
Rückgabe:
void
t3lib_htmlmail::add_message ( msg  )  [inherited]

Adds a line of text to the mail-body. Is normally used internally

Parameter:
string $msg: the message to add
Rückgabe:
void
t3lib_htmlmail::addAttachment ( file  )  [inherited]

Adds an attachment to the mail

Parameter:
string $file: the filename to add
Rückgabe:
boolean whether the attachment was added or not
t3lib_formmail::addAttachment ( file,
filename 
)

Adds an attachment to the mail

Parameter:
string The absolute path to the file to add as attachment
string The files original filename (not necessarily the same as the current since this could be uploaded files...)
Rückgabe:
boolean True if the file existed and was added. private
t3lib_htmlmail::addHTML ( file  )  [inherited]

Adds HTML and media, encodes it from a URL or file

Parameter:
string $file: the filename to add
Rückgabe:
boolean whether the attachment was added or not
t3lib_htmlmail::addPlain ( content  )  [inherited]

Adds plain-text, replaces the HTTP urls in the plain text and then encodes it

Parameter:
string $content that will be added
Rückgabe:
void
t3lib_htmlmail::addUserPass ( url  )  [inherited]

Adds HTTP user and password (from $this->http_username) to a URL

Parameter:
string $url: the URL
Rückgabe:
string the URL with the added values
t3lib_htmlmail::constructAlternative ( boundary  )  [inherited]

Here plain is combined with HTML

Parameter:
string $boundary: the boundary to use
Rückgabe:
void
t3lib_htmlmail::constructHTML ( boundary  )  [inherited]

this function creates the HTML part of the mail

Parameter:
string $boundary: the boundary to use
Rückgabe:
void
t3lib_htmlmail::constructHTML_media ( boundary  )  [inherited]

Constructs the HTML-part of message if the HTML contains media

Parameter:
string $boundary: the boundary to use
Rückgabe:
void
t3lib_htmlmail::constructMixed ( boundary  )  [inherited]

This functions combines the plain / HTML content with the attachments

Parameter:
string $boundary: the mail boundary
Rückgabe:
void
t3lib_htmlmail::convertName ( name  )  [inherited]

Converts a name field Deprecated since TYPO3 4.0

Parameter:
string $name: the name
Rückgabe:
string the name
Veraltet:
since TYPO3 4.0, remove in TYPO3 4.3
t3lib_htmlmail::encodeMsg ( content  )  [inherited]

Encodes the message content according to the options "alt_base64" and "alt_8bit" (no need to encode here) or to "quoted_printable" if no option is set.

Parameter:
string $content the content that will be encoded
Rückgabe:
string the encoded content
t3lib_htmlmail::extParseUrl ( path  )  [inherited]

Returns an array with file or url-information

Parameter:
string $path: url to check
Rückgabe:
array information about the path / URL
t3lib_htmlmail::extractFramesInfo (  )  [inherited]

extracts all media-links from $this->theParts["html"]["content"]

Rückgabe:
array two-dimensional array with information about each frame
t3lib_htmlmail::extractHtmlInit ( html,
url 
) [inherited]

Extract HTML-parts, used externally

Parameter:
string $html: will be added to the html "content" part
string $url: will be added to the html "path" part
Rückgabe:
void
t3lib_htmlmail::extractHyperLinks (  )  [inherited]

extracts all hyper-links from $this->theParts["html"]["content"]

Rückgabe:
void
t3lib_htmlmail::extractMediaLinks (  )  [inherited]

extracts all media-links from $this->theParts['html']['content']

Rückgabe:
void
t3lib_htmlmail::fetchHTML ( file  )  [inherited]

Fetches the HTML-content from either url og local serverfile

Parameter:
string $file: the file to load
Rückgabe:
boolean whether the data was fetched or not
t3lib_htmlmail::fetchHTMLMedia (  )  [inherited]

Fetches the mediafiles which are found by extractMediaLinks()

Rückgabe:
void
t3lib_htmlmail::fixRollOvers (  )  [inherited]

JavaScript rollOvers cannot support graphics inside of mail. If these exists we must let them refer to the absolute url. By the way: Roll-overs seems to work only on some mail-readers and so far I've seen it work on Netscape 4 message-center (but not 4.5!!)

Rückgabe:
void
t3lib_htmlmail::get_tag_attributes ( tag  )  [inherited]

This function analyzes a HTML tag If an attribute is empty (like OPTION) the value of that key is just empty. Check it with is_set();

Parameter:
string $tag: is either like this "<TAG OPTION ATTRIB=VALUE>" or this " OPTION ATTRIB=VALUE>" which means you can omit the tag-name
Rückgabe:
array array with attributes as keys in lower-case
t3lib_htmlmail::getBoundary (  )  [inherited]

Returns boundaries

Rückgabe:
string the boundary
t3lib_htmlmail::getContent ( type  )  [inherited]

returns the content specified by the type (plain, html etc.)

Parameter:
string $type: the content type, can either plain or html
Rückgabe:
void
t3lib_htmlmail::getExtendedURL ( url  )  [inherited]

reads the URL or file and determines the Content-type by either guessing or opening a connection to the host

Parameter:
string $url: the URL to get information of
Rückgabe:
mixed either false or the array with information
t3lib_htmlmail::getHTMLContentType (  )  [inherited]

Returns the content type based on whether the mail has media / attachments or no

Rückgabe:
string the content type
t3lib_htmlmail::getMimeType ( url  )  [inherited]

This function returns the mime type of the file specified by the url

Parameter:
string $url: the url
Rückgabe:
string $mimeType: the mime type found in the header
t3lib_htmlmail::getStrippedURL ( url  )  [inherited]

reads a url or file and strips the HTML-tags AND removes all empty lines. This is used to read plain-text out of a HTML-page

Parameter:
string $url: the URL to load
Rückgabe:
the content
t3lib_htmlmail::getURL ( url  )  [inherited]

reads a url or file

Parameter:
string $url: the URL to fetch
Rückgabe:
string the content of the URL
t3lib_htmlmail::makeBase64 ( inputstr  )  [inherited]

Returns base64-encoded content, which is broken every 76 character

Parameter:
string $inputstr: the string to encode
Rückgabe:
string the encoded string
t3lib_htmlmail::preview (  )  [inherited]

shows a preview of the email of the headers and the message

Rückgabe:
void
t3lib_htmlmail::quoted_printable ( string  )  [inherited]

Implementation of quoted-printable encode. This function was a duplicate of t3lib_div::quoted_printable, thus it's going to be removed. Deprecated since TYPO3 4.0

Parameter:
string Content to encode
Rückgabe:
string The QP encoded string
Veraltet:
since TYPO3 4.0, remove in TYPO 4.3
t3lib_formmail::sanitizeHeaderString ( string  ) 

Checks string for suspicious characters

Parameter:
string String to check
Rückgabe:
string Valid or empty string
t3lib_htmlmail::send ( recipient  )  [inherited]

Assembles the message by headers and content and finally send it to the provided recipient.

Parameter:
string 
recipient
The recipient the message should be delivered to (if blank,

this->recipient will be used instead)

Rückgabe:
boolean Returns whether the mail was sent (successfully accepted for delivery)
t3lib_htmlmail::sendTheMail (  )  [inherited]

Sends the mail by calling the mail() function in php. On Linux systems this will invoke the MTA defined in php.ini (sendmail -t -i by default), on Windows a SMTP must be specified in the sys.ini. Most common MTA's on Linux has a Sendmail interface, including Postfix and Exim. For setting the return-path correctly, the parameter -f has to be added to the system call to sendmail. This obviously does not have any effect on Windows, but on Sendmail compliant systems this works. If safe mode is enabled, then extra parameters is not allowed, so a safe mode check is made before the mail() command is invoked. When using the -f parameter, some MTA's will put an X-AUTHENTICATION-WARNING saying that the return path was modified manually with the -f flag. To disable this warning make sure that the user running Apache is in the /etc/mail/trusted-users table.

POSTFIX: With postfix version below 2.0 there is a problem that the -f parameter can not be used in conjunction with -t. Postfix will give an error in the maillog:

cannot handle command-line recipients with -t

The -f parameter is only enabled if the parameter forceReturnPath is enabled in the install tool.

This whole problem of return-path turns out to be quite tricky. If you have a solution that works better, on all standard MTA's then we are very open for suggestions.

With time this function should be made such that several ways of sending the mail is possible (local MTA, smtp other).

Rückgabe:
boolean Returns whether the mail was sent (successfully accepted for delivery)
t3lib_htmlmail::setContent (  )  [inherited]

Begins building the message-body

Rückgabe:
void
t3lib_htmlmail::setHeaders (  )  [inherited]

Clears the header-string and sets the headers based on object-vars.

Rückgabe:
void
t3lib_htmlmail::setHtml ( content  )  [inherited]

Sets the HTML-part. No processing done.

Parameter:
string $content: the HTML content
Rückgabe:
void
t3lib_htmlmail::setPlain ( content  )  [inherited]

Sets the plain-text part. No processing done.

Parameter:
string $content: the plain content
Rückgabe:
void
t3lib_htmlmail::setRecipient ( recipient  )  [inherited]

Sets the recipient(s). If you supply a string, you set one recipient. If you supply an array, every value is added as a recipient.

Parameter:
mixed $recipient: the recipient(s) to set
Rückgabe:
void
t3lib_htmlmail::split_fileref ( fileref  )  [inherited]

Returns information about a file reference

Parameter:
string $fileref: the file to use
Rückgabe:
array path, filename, filebody, fileext
t3lib_htmlmail::start (  )  [inherited]

start action that sets the message ID and the charset

Rückgabe:
void
t3lib_formmail::start ( V,
base64 = false 
)

Start function This class is able to generate a mail in formmail-style from the data in $V Fields:

[recipient]: email-adress of the one to receive the mail. If array, then all values are expected to be recipients [attachment]: ....

[subject]: The subject of the mail [from_email]: Sender email. If not set, [email] is used [from_name]: Sender name. If not set, [name] is used [replyto_email]: Reply-to email. If not set [from_email] is used [replyto_name]: Reply-to name. If not set [from_name] is used [organisation]: Organisation (header) [priority]: Priority, 1-5, default 3 [html_enabled]: If mail is sent as html [use_base64]: If set, base64 encoding will be used instead of quoted-printable

Parameter:
array Contains values for the field names listed above (with slashes removed if from POST input)
boolean Whether to base64 encode the mail content
Rückgabe:
void
t3lib_htmlmail::substHREFsInHTML (  )  [inherited]

This function substitutes the hrefs in $this->theParts["html"]["content"]

Rückgabe:
void
t3lib_htmlmail::substHTTPurlsInPlainText ( content  )  [inherited]

This substitutes the http:// urls in plain text with links

Parameter:
string $content: the content to use to substitute
Rückgabe:
string the changed content
t3lib_htmlmail::substMediaNamesInHTML ( absolute  )  [inherited]

This function substitutes the media-references in $this->theParts["html"]["content"]

Parameter:
boolean $absolute: If true, then the refs are substituted with http:// ref's indstead of Content-ID's (cid).
Rückgabe:
void
t3lib_htmlmail::t3lib_htmlmail (  )  [inherited]

Constructor. If the configuration variable forceReturnPath is set, calls to mail will be called with a 5th parameter. See function sendTheMail for more info

Rückgabe:
void
t3lib_htmlmail::tag_regex ( tags  )  [inherited]

Creates a regular expression out of a list of tags

Parameter:
mixed $tagArray: the list of tags (either as array or string if it is one tag)
Rückgabe:
string the regular expression
t3lib_htmlmail::use8Bit (  )  [inherited]

sets the encoding to 8bit and the current charset of both the Plain Text and the HTML mail

Rückgabe:
void
t3lib_htmlmail::useBase64 (  )  [inherited]

sets the encoding headers to base64 for both the Plain Text and HTML mail

Rückgabe:
void
t3lib_htmlmail::useQuotedPrintable (  )  [inherited]

sets the header of both Plain Text and HTML mails to quoted printable

Rückgabe:
void

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
 Alle Klassen Namensbereiche Funktionen Variablen

Erzeugt am Wed Oct 28 16:40:23 2009 für Typo3 von  doxygen 1.6.1