Re: [SMARTY] email and fetch

From: Date: Sun, 06 Apr 2003 12:08:05 +0000
Subject: Re: [SMARTY] email and fetch
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9147@lists.php.net to get a copy of this message
On Sun, Apr 06, 2003 at 01:07:59PM +0200, Travel Jadoo wrote: > I came across the email of 14 Feb on the mailing list but couldn't find > a answer. > > Anybody got an idea? > > Thanks, > Alfred > > Hi, > > I hope that I can get some help on this one. My site sends out a > registration email, and I am trying to use Smarty to define the layout > of the email. So my email template looks something like this: > > e_register.tpl > ---------------------------- > > Hello {$username}, > > Welcome to {#siteName#}. Your username is {$username} and your password > is {$password}. You can log in by going to {#siteURL#}login.php. > > Regards, > {#siteName#} Webmaster > > ----------------------------- > > Then I do the following in my PHP script to get the output of that > template to send: > > register.php > ----------------------------- > $tpl->assign("username",$username); > $tpl->assign("password",$password); > $body = $tpl->fetch("email/e_register.tpl"); > $tpl->clear_all_assign(); > > ----------------------------- > > And then I simply make $body be the body for the email and use phpmailer > to send out the email. But! The email is coming through with spaces all > missing. All the blank lines are gone and tabs are gone. Anyone got any > ideas as to how to include the template in the email without losing all > the formatting? I don't want to send HTML email, I like plaintext, and I > have searched through the documentation and the Wiki for any existing > examples. you don"t use any outputfilters (trimwhitespace) accidently. do you? greetings messju > Regards, > Paul Lockaby

« previous php.smarty.general (#9147) next »