Statistics
Product version: |
EPiServer Mail 4.4 SP1 |
---|---|
Document version: |
1.0 |
Document last saved: |
Web Service
The Web Service section is only for systems that do not have the EPiServer Mail Editor installed.
If you are not using the EPiServer Mail Editor but want to handle bounces you need to implement the following to web service methods, which are called from the EPiServer Mail Server Cluster:
void AddBouncesByGuid(string messageId, string[ ] emails)
void AddBounceByGuid(string messageId, string email)
AddBouncesByGuid accepts an array of email addresses (strings) which are to be marked as bouncing. The messageId is the version provided in the order mail.
AddBounceByGuid works just like AddBouncesByGuid, but accepts a single email address.
SOAP details
Here are example calls for the web service methods returning bounces for a newsletter using EPiServer Mail Order Mail Specification 2.0 or later.
Example 1
POST /mySite/UI/Mail/Public/EPiServerMailService.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: http://schemas.episerver.com/Mail/WebServices/v4/AddBouncesByGuid
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddBounces xmlns="http://schemas.episerver.com/Mail/WebServices/v4/">
<messageId>f1e5693f-49b0-40f7-b526-8d3befc02ebc</messageId>
<emails>
<string>email1@example.com</string>
<string>email2@example.com</string>
</emails>
</AddBounces>
</soap:Body>
</soap:Envelope>
Example 2
POST /Netstar/StarMail/StarMail.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://schemas.episerver.com/Mail/WebServices/v4/AddBounceByGuid"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddBounce xmlns="http://schemas.episerver.com/Mail/WebServices/v4/">
<messageId>f1e5693f-49b0-40f7-b526-8d3befc02ebc</messageId>
<email>email1@example.com</email>
</AddBounce>
</soap:Body>
</soap:Envelope>
Statistics setup
Statistics for the number of opened emails and clicks are collected through the GoMail.aspx page. This page has to be publicly available for the statistics collection to work.
If the EPiServer Mail Editor is not used, it is necessary to implement such a page to make it possible to get statistics. Note that links in the HTML mail will need to be modified to go to this page prior to sending the order mail. The “gomail” page itself should to be set up to log the request and then redirect to the original destination.
What kind of Statistics is it possible to get?
- Opened messages (the total number of times an item has been opened)
- Unique opened messages (the number of times an item has been opened by a unique user)
- Unknown
- Export opened
- Clicks
- Export clicks
- When the messages opened
Bounce Management
The EPiServer Mail server collects information about emails that bounce (not deliverable). The information is sent back to the sender using a SOAP Web Service interface. It is up to the sender to decide the action on e-mail addresses that bounce. For example, if an address bounces more than two times it could be removed from the recipients list.
When using the EPiServer Mail Editor and its built in bounce reporting system, bounces are recorded in the table tblStarMailBounce.
EPiServer Mail Configuration File
The data in the configuration file is created when installing EPiServer Mail. To change the EPiServer Mail configuration after the installation it can be done in the EPiServer Mail Configuration file.
The configuration file is located at <site root name>/EPiServerMail.config
Below is an example of an EPiServer Mail configuration file.
<episerver.mail>
<sites>
<site hostname="Default">
<broker brokerName="50983256-5e59-4f68-b1d0-7e362a9190a4" brokerHostname="episervermail.episerver.com" brokerIP="217.114.81.159">
<rsaKeyValue modulus="zG5Z4RaYhz5Grxlb+HVRWG2zzuGMECzngy1+OMmbOts0iZyirrZZlP69B3oh8xZJKAZ/smE7WWx31uPasRmP2bWe9OTGbF13FwLv4OiEDuA5/M3Q6kn7Srdz/VhWURfB+CwoZkdgDv5t2wY2tRRH4b33V1/qiJ7ZB20Cuuj566LdY+gIfJod3PSOIoE8VpQq1pPeof09U70oQHZKlf974BvBjcVm4TCM5vR7G8hBZR0TAqf2rkNmby3BNAqkxpJnB9VSR6iec/XSLsisQZ39oeU2KAYgspLfi81TyxG4ChyT/ar6Ao8MQHuapmkXG+IYANNMBAA20RP61UVrC1NfVTjjTRu5U5hMYqKB4btc3JPj9/XgRtpMSZ+n961wuy3uXPFK86dWRlp0SNF6r++u/NB53wgmwrrWdsurYYsxCnE81gvK1CoPgKkFk4hVBmuFytGem+Xuv3aDyA1ENtTgz7UV/DB2m3L64e6b1V4ukChzTUZXQmHejHfL21SXzbBW1/zYAigpyhZke20LB66ndlMgb+jm8S5teftK1lpUnqKGd7/O17eQa47jMBdznZ2U1MDhnYcGxDJd+4JOkW+smhRG3LrFDKfCOYIHtQRCw3OkXnL4TMjxub61V9U/AoknbamqXVlcgaUM3FKIR5Y3HayfGYuUiOQI3PDEUsE4vSU=" exponent="AQAB" />
</broker>
<editor defaultFromAddress="no-reply@example.com" defaultFromName="Example.com Mailing Service" goMailUrl="http://www.example.com/EPiServerMail/Public/GoMail.aspx" mailFromAddress="support@example.com" goMailImageUrl="http://www.example.com/EPiServerMail/Public/pixel.gif" encoding="iso-8859-1" editorWebServiceUrl="http://www.example.com/EPiServerMail/Public/EPiServerMailService.asmx" />
<smtpServer name="smtp.example.com" port="25" timeout="60" authMode="AuthLogin" account="myaccount@example.com" password="ba43nan1" />
</site>
</sites>
</episerver.mail>