Class CMailFile


Located in File: Program_Root/cmailfile.inc.php


CMailFile sends mail with attachment
 

Class Variable Summary
$actual_name
Default Value: -><-
$subject
Default Value: -><-
$addr_to
Default Value: -><-
$text_body
Default Value: -><-
$text_encoded
Default Value: -><-
$mime_headers
Default Value: -><-
$mime_boundary
Default Value: ->_"<-
$smtp_headers
Default Value: -><-

Method Summary
CMailFile ( $subject, $to, $from, $msg, $filename, [$mimetype = "application/octet-stream"], [$mime_filename = false], [$actual_name = ""], [$headers = ""] )
Constructor
attach_file ( $filename, $mimetype, $mime_filename )
Attach file
encode_file ( $sourcefile )
Encode the file
sendfile ( )
Send the file
write_body ( $msgtext )
Write bodytext
write_mimeheaders ( $filename, $mime_filename )
Write the MIME Headers
write_smtpheaders ( $addr_from )
Write the SMTP Headers
my_chunk_split ( $str )
Chunk split

Variable Detail

$actual_name



$subject



$addr_to



$text_body



$text_encoded



$mime_headers



$mime_boundary



$smtp_headers




Function Detail

CMailFile

CMailFile ( $subject, $to, $from, $msg, $filename, [$mimetype = "application/octet-stream"], [$mime_filename = false], [$actual_name = ""], [$headers = ""] )

Constructor
 Initializes the complete object and sets all values for sending
 Added option to add headers
 
Function Parameters:
- $subject: subject
Function Info:
Author - YLee
Author - Herman Suijs

attach_file

attach_file ( $filename, $mimetype, $mime_filename )

Attach file
 This method attaches the file to the messagetext
 Problem with actual name corrected
 
Function Parameters:
Function Info:
Author - YLee
Author - Herman Suijs

encode_file

encode_file ( $sourcefile )

Encode the file
 Properly encode the file before sending
 
Function Parameters:
Function Info:
Author - YLee

sendfile

sendfile ( )

Send the file

Function Parameters:
Function Info:

write_body

write_body ( $msgtext )

Write bodytext

Function Parameters:
Function Info:

write_mimeheaders

write_mimeheaders ( $filename, $mime_filename )

Write the MIME Headers

Function Parameters:
Function Info:

write_smtpheaders

write_smtpheaders ( $addr_from )

Write the SMTP Headers

Function Parameters:
Function Info:

my_chunk_split

my_chunk_split ( $str )

Chunk split
 This is an extra function added to make it work with all PHP versions
 
Function Parameters:
Function Info:
Author - YLee