Zcms:email

From GruppoZenit
Jump to: navigation, search

zcms:email tag contains information on how to send emails according to the configuration provided using its attributes. The list of attributes that the tag supports is given below.

Attribute Definition
config Optional.

Name of the configuration that is being configured via back-office. If this attribute is left blank, will use the default configuration

template Optional.

Name of the page identifier that is to be used as the message

type Optional.

The type of the message. Possible values are "HTML" or "TEXT" or "ATTACHMENT". By default is "TEXT"

from A valid email address, from which the message is sent
to A valid email address, to which the message is sent to
subject The subject of the email.
message The message which is to be sent. If the attribute "template" is filled, the content of the template will be set as message

Note: the values of some inline attributes such as "from/to/subject/message" can be passed as parameter value with zcms:param tag. For example:

<zcms:email config="defaultmail" to="someone@gruppozenit.com" from="somesender@gruppozenit.com" subject="Hello" message="Hello World!!!" />

<zcms:email config="defaultmail">
   <zcms:param name="to" value="someone@gruppozenit.com" />
   <zcms:param name="from" value="somesender@gruppozenit.com" />
   <zcms:param name="cc" value="user1@gruppozenit.com;user2@gruppozenit.com"/>  
   <zcms:param name="bcc" value=""demouser3@gruppozenit.com;demouser4@gruppozenit.com"/> 
   <zcms:param name="bounceaddress" value="bounceaddress@gruppozenit.com"/>   
   <zcms:param name="subject" value="Hello" />
   <zcms:param name="message" value="Hello World!!!" />
</zcms:email>

To send mail with cc ,the param name should be "cc" and to send bcc with zcms email the param name must be "bcc".

To set the bounceback address the param name should be "bounceaddress", the default bounceaddress is the from address.


zcms:attach-file

zcms:attach-file tag is used to send attachments along with email.This tag must be wrapped within zcms:email tag

Attribute Definition
name

Name given to the file along with extension of the file(eg:testdocument.pdf)

description

Description about the attachment document

url

The url of the attachment


<zcms:email config="defaultmail" to="someone@gruppozenit.com" from="somesender@gruppozenit.com" subject="Hello" message="Hello World!!!" />

	<zcms:email config="eteammail" to="demotoemail@eteamindia.com" from="somesender@gruppozenit.com" subject="attachmenttest" message="attachmenttest" type="ATTACHMENT" >
	<zcms:attach-file name="sampledocument.pdf" description="attachmentdetails" url="http://localhost:8080/zcms/zupload/doc.pdf"/>
	</zcms:email>
	

See also

Personal tools
Namespaces

Variants
Actions
Toolbox