Location: PHPKode > scripts > dSendMail2 > dsendmail2-2-0/example-ImportEML.php
require_once "dSendMail2.inc.php";

// First of all: DISABLE TIME LIMIT and IGNORE USER ABORT! You really don't want to be interrupted in the middle of this.

// What is an EML? How to create it?
// - Open your Outlook Express
// - Write your message. Add your images, make your formatting, do what you want.
// - Now go to File > Save as. There you go, a brand new EML file.
// - Don't be afraid, it's nothing more than a TXT file... You can open it with notepad if you want.

// Loading the EML File.
$m = new dSendMail2;

// If your EML file is saved in your database, you may use:
// $m->importEML($eml_data)

// - You cannot access the 'user-friendly' contents, because there are none!
// - Class DOESN'T import subject, destination, and most of other headers

$m->setSubject("Here goes my e-mail..");

// Ps: Maybe you want to use an EML file as template for your e-mails...
// In this case, you can put [MESSAGE] in the middle of your EML file and then:
// Not gauranteed.. We can never know what Microsoft will do with your message code.
// $m->output = str_replace("[MESSAGE]", "Here goes your new message.", $m->output);
// $m->send();
// Suggestion: If you want an e-mail template, make it as HTML.
Return current item: dSendMail2