Pictures in emails

How to place pictures in emails within Carerix

Updated over a week ago

If one wishes to place pictures in emails in Carerix there are 2 ways to do this.

Option 1 - Upload in attachment of office

In this method you upload a picture as attachment of your office.
Steps to follow:

  • Go to "Management" - "All offices" - Open your office - tab "Attachment"

  • Upload the image with:
    - Type = any, not specific type needed
    - Description: "picturename" (this can be any name but needs to match the name in the code below)
    - Edit the emailtemplate you want to use with the below code:
    a) Either put the HTML code in an existing template to put the picture in the right place.
    b) Or if you want only to show a picture, create a new template with the Code for a complete template (email with only a picture) 

The following code retrieves the picture from the office of the current user with the discription "Picturename"

HTML code:

<cx:if condition="$activity.owner.agency.attachmentsByLabel.picturename <> nil">
<img src="<cx:write value='$activity.owner.agency.attachmentsByLabel.picturename.url' />" style="display: block;" alt="Photo" />
</cx:if>


Code for a complete template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<body>
<cx:if condition="$activity.owner.agency.attachmentsByLabel.picturename <> nil">
<img src="<cx:write value='$activity.owner.agency.attachmentsByLabel.picturename.url' />" style="display: block;" alt="Photo" />
</cx:if>
</body>
</html>

Option 2 - Upload from an external server

This method retrieves the picture from your webserver. You need to upload the picture there first.

HTML code:

<img src="http://www.website.com/picture.jpg" style="display: block;" alt="Photo" />

This code retrieves the following picture: http://www.website.com/picture.jpg.

Code for a complete template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<body>
<img src="http://www.website.com/afbeelding.jpg" style="display: block;" alt="Photo" />
</body>
</html>


____
Keywords: UD-641

Did this answer your question?