PHP Classes

Fatal error: Uncaught exception 'SmartyException' with message '

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  Fatal error: Uncaught exception...  >  (Un) Subscribe thread alerts  
Subject:Fatal error: Uncaught exception...
Summary:when i run this file "test_smarty_personalized_mailing"
Messages:7
Author:hassan
Date:2011-09-03 06:06:33
Update:2011-09-06 08:15:28
 

  1. Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of hassan hassan - 2011-09-03 06:06:33
in the name of Allah
hi
when i run this file "test_smarty_personalized_mailing.php" . this error appear :
"
Fatal error: Uncaught exception 'SmartyException' with message 'unknown method 'template_exists'' in C:\Program Files\temp\EasyPHP-5.3.2i\www\mimemessage-2011-03-08\Smarty-3.0.8\libs\sysplugins\smarty_internal_wrapper.php:117 Stack trace: #0 C:\Program Files\temp\EasyPHP-5.3.2i\www\mimemessage-2011-03-08\Smarty-3.0.8\libs\Smarty.class.php(765): Smarty_Internal_Wrapper->convert('template_exists', Array) #1 [internal function]: Smarty->__call('template_exists', Array) #2 C:\Program Files\temp\EasyPHP-5.3.2i\www\mimemessage-2011-03-08\test_smarty_personalized_mailing.php(106): Smarty->template_exists('mailing.html.tp...') #3 {main} thrown in C:\Program Files\temp\EasyPHP-5.3.2i\www\mimemessage-2011-03-08\Smarty-3.0.8\libs\sysplugins\smarty_internal_wrapper.php on line 117
"
please help how can i correct this error

  2. Re: Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-09-03 06:47:54 - In reply to message 1 from hassan
This is for Smarty 2. For Smarty 3 it needs to be adapted.

  3. Re: Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of hassan hassan - 2011-09-03 07:16:29 - In reply to message 2 from Manuel Lemos
tanks

  4. Re: Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of hassan hassan - 2011-09-04 11:30:11 - In reply to message 3 from hassan
i use smarty 2 but this error appear:

Fatal error: Smarty error: the $compile_dir 'templates_c' does not exist, or is not a directory. in C:\Program Files\temp\EasyPHP-5.3.2i\www\mimemessage-2011-03-08\Smarty-2.6.26\libs\Smarty.class.php on line 1093

please help me

  5. Re: Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-09-04 22:42:14 - In reply to message 4 from hassan
That is the compiled templates directory. If you do not have the templates_c directory, you need to create it.

  6. Re: Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of hassan hassan - 2011-09-06 06:53:13 - In reply to message 5 from Manuel Lemos
hi
for send bulk email i use smtp_message_class like this:

$email_message=new smtp_message_class;
$email_message->localhost="localhost";
$email_message->smtp_host="smtp.gmail.com";
$email_message->smtp_port=465;
$email_message->smtp_ssl=1;
$email_message->smtp_user="ansar313@gmail.com";
$email_message->smtp_password="********";
$email_message->smtp_debug=1;

but it is very slow
you suggest this :
/*
* For faster queueing use qmail...
*
* require_once("qmail_message.php");
* $email_message=new qmail_message_class;
*
* or sendmail in queue only delivery mode
*
* require_once("sendmail_message.php");
* $email_message=new sendmail_message_class;
* $email_message->delivery_mode=SENDMAIL_DELIVERY_QUEUE;
*
* Always call the SetBulkMail function to hint the class to optimize
* its behaviour to make deliveries to many users more efficient.
*/

how can i use smtp_message_class and qmail_message_class together?
or
how can i use smtp_message_class and sendmail_message_class together?
can i use qmail with windows OS ?

  7. Re: Fatal error: Uncaught exception...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-09-06 08:15:28 - In reply to message 6 from hassan
You can't because it does not make sense. Each sub-class specialize in a different delivery method. Either you use one or the other, not more than one.

There is no qmail for Windows although it may be possible to compile it with CygWin.

There is Sendmail for Windows, although I think it is commercial.

Anyway, in Windows usually you can either use SMTP or Exchange. The pickup class is for using Exchange, but Exchange is commercial too.

So, I think you will end up using SMTP.