Cc = $Cc; $message->Bcc = $Bcc; //**SETTING_CONTENT*********************************************************** //** email messages can have different versions of the same content. This is //** known as a 'multipart/alternative' message. You can set either the text //** version, HTML version, or both. //** set the text version of the email message. $text = 'Hello World!'; $message->SetTextContent($text); //** set the HTML version of the email message. $html = 'Hello World!'; $message->SetHtmlContent($html); //** NOTE: the standard (RFC 1521) states that content versions should be //** added in order from simplest to most complex. This means it is always //** best to set the text content for an email before any other version (i.e. //** HTML or other). //**ATTACHMENTS*************************************************************** //** get the full path to the file to be attached as well as the standard //** MIME type for the file. This value can be left blank. $pathToServerFile = __FILE__; //** attach this very PHP script. $serverFileMimeType = 'text/plain'; //** this PHP file is plain text. //** attach the given file to be sent with this message. ANy number of //** attachments can be associated with an email message. //** NOTE: If the file path does not exist or cannot be read by PHP the file //** will not be sent with the email message. $message->Attach($pathToServerFile, $serverFileMimeType); /* EXAMPLE ONLY //**ADDITIONAL_CONTENT******************************************************** //** data other than text and HTML can be sent as a content version for an //** email message. A common example is Richtext. The only limit on what can //** be sent as content is really the capabilities of the client email //** application. Most email clients won't support much more than text and //** HTML, wheas Outlook will probably support other Microsoft formats (i.e //** Word, Excel, etc). //** get the full path to the file to be used as a version as well as the //** standard MIME type for the file. $pathToServerFile = 'HelloWorld.doc'; //** use Word doc as version. $serverFileMimeType = 'application/word'; //** standard word MIME type. //** set the file version of the content. $message->SetFileContent($pathToServerFile, $serverFileMimeType); //** NOTE: even when I tested the above Word attachment outlook displayed //** the HTML version. Stick to text, HTML, and at best other text formats //** when using content versions. EXAMPLE ONLY */ //**SEND_EMAIL**************************************************************** //** send the email message. $message->Send(); ?>