Saving message header & body

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
robertgral
Forum Newbie
Posts: 2
Joined: Sun Mar 02, 2008 6:04 am

Saving message header & body

Post by robertgral »

Hi, is there any way to get message header & body after creation process is finished and before it gets sent? To save it in 'Sent' folder for instance

cheers
Robert
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Saving message header & body

Post by Chris Corbyn »

Code: Select all

$stream = $message->build();
echo $stream->readFull();
This is much nicer in v4 where there will be a simple $message->toString() method.
robertgral
Forum Newbie
Posts: 2
Joined: Sun Mar 02, 2008 6:04 am

Re: Saving message header & body

Post by robertgral »

thanks Chris,

that was all I needed..
Post Reply