Within the BS Skills, there is a new API method available to create E-Mails. Even though sending E-Mails through SMTP is available in the CORE as well, it is often not configured or only difficult to configure, as IT and system admin support is required along with cooperation and communication between multiple parties. Also, the standard mail sending API requires an XML template for the mail content and therefore cooperation of
- a web developer to design the HTML mail text
- a Contentserv developer to understand how to integrate the template in Contentserv
- a web server or system admin to deploy the template to the file system of the webserver
All in all sending E-Mails is for that reason simply not used. As the whole idea of the BS Skills is the empowerment of simple business users for "gettings things done", the BS Skills added a simple to use and reliable E-Mail concept.
The E-Mail API is using a library called PHP Mailer. This API is able to connect to an SMTP host and does not require any php.ini or local SMTP configuration.
The configuration requires the following settings:
It is even possible to leave out the SMTP settings here and use default settings sending mails through the Contentserv account email@example.com. However, be aware of the following issues, when using the BS account:
- emails are visible to the Contentserv Mail Administrator,
- all emails are transferred through the open internet in a non-encrypted format and visible to network sniffers,
- it is not possible to change the "From E-Mail" setting so that all mails are sent through the "Contentserv PIM" user account "firstname.lastname@example.org".
For that reason, it might be ok to quickly start and use the empty default settings for test, demo, dev or QA environments. But in production at least, it is strongly recommended to configure here an official SMTP server.
Providing custom Mail Templates
The E-Mail Template setting allows using custom project templates as Zend View .phtml-files.
To be available here provide your templates to the folder
and make them end with .phtml. Have a look at the default template to match the syntax, which can be found at
Using the API
The API is implemented as a static function of the CSAlani.php API with the following signature:
A simple call would look like this:
Interesting always is sending attachments along with E-Mails because of the following questions:
- how large can embedded attachments become?
- if not embedded, can the recipient access the linked attachment on the Contentserv webserver?
The answer to the first question depends on the recipient's E-Mail provider.
A first idea gives the following table:
|Email Provider||Maximum Email Size Limit|
|Gmail||25Mb (per email sent or received)|
|Outlook.com and Hotmail||10Mb (per file attachment) or 300Gb (only for files attached via SkyDrive!)|
|Yahoo Mail||25Mb (per email) or unlimited (only for files attached via DropBox – limited by your DropBox account size)|
|AOL||25Mb (per email sent or received)|
|Mail.com||50Mb (per attachment) and 10Mb (per file)|
|Zoho Mail||12Mb (per email) and 10Mb (per file)|
|GoDaddy Workspace||30Mb (per email) and 20Mb (per file)|
|Email Client||Maximum Email Size Limit|
|Microsoft Outlook||20Mb (per attachment)|
|Windows Live Mail||10Gb (per email) and no more than 50Mb per file attached|
So in general 25MB should be a good limit unless your organization uses Zoho.
If the total size of attachments exceeds the 25MB limit it is recommended to list all attachments within the HTML body as hyperlinks. Contentserv provides here the method
The $base parameter should be set to 'external' of course then.
Using Public Links
When creating links to files on the CS web server always keep in mind, that the web server could be hidden behind the companies firewall and not be accessible for recipients. There is another BS Skills method to automatically upload such files first to a public web server and then create the link pointing to this external public web server:
For further information on such public links and how to configure click on this link.