How to send email with specific worflow

Author Message

Stéphane Bullier

Friday 09 February 2007 7:35:05 am

Hello all

I have to make in place a worflows for sending an email for demand of translattion from editor to admin when the editor edit some new content and not all. So I can't use the default trigger "content-publish-before".

I would like to known if it's possible to add a button on editing template of new content and run my worflow. If it's yes, in which /kernel/classes I can find some details to send email.

Cheers.

PS : I use ez 3.9

Stéphane

Stéphane Bullier

Wednesday 14 February 2007 11:59:44 pm

Hello,

Update ??

Not clear my question ?

Stéphane

Kristof Coomans

Thursday 15 February 2007 12:10:48 am

Hi Stéphane

Several classes used to send mail are located in lib/ezutils/classes.

You can find several examples of the usage of eZMail in the source code:

# find . -name "*.php" | xargs grep -il "ezmail"

There are also some extensions related to e-mail, take a look at the list on http://ezpedia.org/wiki/en/ez/e_mail

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Stéphane Bullier

Thursday 15 February 2007 12:38:32 am

Thank you Kristof for your reply.

Stéphane

*- pike

Friday 09 November 2007 4:14:12 am

I didn't tliterally test this, but it should be something like

include_once( "lib/ezutils/classes/ezmail.php" );
include_once( "lib/ezutils/classes/ezmailtransport.php" );

if (!eZMail::validate($sender) || !eZMail::validate($recipient)) {
   cry(); 
} else {
   $mail = new eZMail();
   $mail->setSender( $sender );
   $mail->setReceiver( $recipient );
   $mail->setSubject( $subject );
   $mail->setBody( $body );
   $mail->addBcc( $bcc );
   $mail->addExtraHeader("X-SpamLevel,"1000");
					
   if ( !eZMailTransport::send( $mail ) {
      cry(); 
   }
}

---------------
The class eZContentObjectTreeNode does.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.