PHPMailer question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Does anyone know if it is possible to configure PHPMailer so that  
instead of actually sending the message it writes its contents out to a  
file (i.e., including all the message headers, boundaries, etc.)?


Re: PHPMailer question

you should have a look into methods official documentation, but I don't
think you can redirect the out into a file...:-/

Re: PHPMailer question

Quoted text here. Click to load it

Sure, why don't you BCC it to a local address and have your sendmail
aliases file set to file this alias?

Or if you don't want the mail sent at all, just put this file address
in the To slot of the PHP mail function call.

You are doing this on a good OS like Unix, right?

I have no clue how to do this on Windows but it must be possible.

Jerry Sievers   305 854-3001 (home)     WWW ECommerce Consultant
                305 321-1144 (mobile

Re: PHPMailer question

Thanks for the suggestions.

I was able to get the result I wanted by creating a child class of PHPMailer  
that defines a new mailer "file".  If someone else is searching through the  
groups for an answer to this, look at PHPMailer's send() function.  You can  
get the results by concatting $this->CreateHeader() and $this->CreateBody()  
but first you need to call $this->SetMessageType() (and setting  
$this->ContentType if there's an AltBody).

- Kevin

Quoted text here. Click to load it

Site Timeline