Zendcasts Forum

A community of developers who work with the Zend Framework and other enterprise PHP technologies

You are not logged in.

#1 2010-06-22 19:30:08

Jon Lebensold
Administrator
Registered: 2009-06-27
Posts: 279

ZC56 – Painless HTML Emails with Zend_Mail

Here's a quick video explaining how quickly and easy it is to write designer-friendly HTML emails using Zend_View and Zend_Mail.

Enjoy!

Offline

#2 2010-06-23 19:05:53

abtris
New member
From: Prague
Registered: 2009-11-13
Posts: 5
Website

Re: ZC56 – Painless HTML Emails with Zend_Mail

I have question, i try use $this->baseUrl(); helper in mail template and doesn’t work. Any help?

Offline

#3 2010-06-24 02:03:55

Jon Lebensold
Administrator
Registered: 2009-06-27
Posts: 279

Re: ZC56 – Painless HTML Emails with Zend_Mail

hey abtris,

I think it might have something to do with what $this is in the mail template. When you instantiate Zend_View, it might not have all the helper object references that the Zend_View from your Zend_Controller would have...

Offline

#4 2010-06-27 19:32:54

tribesman
Member
Registered: 2010-06-27
Posts: 10

Re: ZC56 – Painless HTML Emails with Zend_Mail

hi Jon,
Great tutorial series i have ever watch about zend framework

how we can set up zend_translate for zend_mail with zend_view method, normally i use zend translate but when i try to use with zend_mail html it didnt work

Offline

#5 2010-06-27 20:48:19

Jon Lebensold
Administrator
Registered: 2009-06-27
Posts: 279

Re: ZC56 – Painless HTML Emails with Zend_Mail

Hi tribesman,

you should be able to use the zend_translate view helpers in the zend_Mail instance of Zend_View... What does your code look like?

Offline

#6 2010-06-27 22:45:16

tribesman
Member
Registered: 2010-06-27
Posts: 10

Re: ZC56 – Painless HTML Emails with Zend_Mail

This is my translate code in my bootstrap and i used csv files with utf-8

    Zend_Loader::loadClass('Zend_Translate');
    Zend_Loader::loadClass('Zend_Registry');
    $registry = Zend_Registry::getInstance();
    $lang=new Zend_Locale();
    $translate =new Zend_Translate('csv',APPLICATION_PATH.'/lang/'.$lang->getlanguage().'.csv',
                    'auto',
                    array('scan'=>Zend_Translate::LOCALE_FILENAME)
                    );    
    
    $translate->setlocale($lang);
    $view->jquery()->enable();
    $registry->set('Zend_Translate', $translate);

i used your ZC56 – Painless HTML Emails with Zend_Mail tutorial codes and i try it with direct echo in phtml file and sending viewparams both didint translate

Offline

#7 2010-06-27 23:59:50

tribesman
Member
Registered: 2010-06-27
Posts: 10

Re: ZC56 – Painless HTML Emails with Zend_Mail

ok i handled it.. i forgot translate code in phtml smile silly me

Offline

Board footer

Powered by FluxBB