This page is still a beta!

1.9. Backend module

Introduction

Powermail offers a backend module to view all mails in the database

  1. Choose Powermail in the Web menu on the left site of the backend

  2. Choose List or Chart mode in dropdown (right top)

Powermail list and export

  1. Now you can choose any page of the pagetree

  2. If the chosen page contents powermails, a list with mails is shown to you

  3. You can filter the mails by using the two fields above the list (first field is the starttime, second field the endtime)

  4. Export symbols:

  5. Excel symbol: Export the current list to an xls file

  6. CSV symbol: Generate and download a CSV file

  7. HTML table symbol: Just generate a html table without any formats

  8. Enable deleting of mails after export (or disabling)

Powermail charts

  1. The chart view gives you a chart of the number of mails in the current chosen folder

  2. Define the frequency and timerange via tsconf (see below)

Define your export file as you want via tsconfig

Use tsconfig of the page where your powermails are listed, to manipulate the export file or the listing in the backend (see example)

Example

# set columns

tx_powermail_mod1.export {

number = #

uid42 = Title

uid43 = Prename

uid44 = Lastname

uid45 = Email

date = Registration-Date

time = Registration-Time

}

# set config

tx_powermail_mod1.config {

export {

useTitle = 1

dateformat = d.m.Y

timeformat = H:i

}

list {

perPage = 50

filterstart = 2008-04-01 00:00

filterend = 2008-12-01 00:00

dateformat = d.m.Y H:i

}

chart {

timeframe = 10713600

sectionframe = 2678400

title = 4 Month ago | 3 Month ago | 2 Month ago | Last Month

}

}

Example file for tsconfig above

#

Title

Prename

Lastname

Email

Registration-Date

Registration-Time

1.

Dr.

Alex

Kellner

test@test.de

01.01.2009

12:23

2.

Mischa

Heissmann

test@test.com

23.12.2208

16:11

Available markers for tsconfig

Export settings (prefix: tx_powermail_mod1.export)

Name

Explanation

What is this

Default if no tsconfig set

number

Just an ascending number

Field value

1

date

Registration date (format can be set – see below)

Field value

1

time

Registration time (format can be set – see below)

Field value

1

sender

Email of sender

Field value

1

senderIP

IP address of sender

Field value

1

recipient

Email of recipient

Field value

1

subject_r

Email subject to recipient

Field value

1

formid

Page ID where the form is in

Field value

1

content

Email content

Field value

0

UserAgent

UserAgent of sender

Field value

1

Referer

Referer of sender

Field value

1

SP_TZ

Location of sender

Field value

1

uid

This automaticly fills columns with ALL pivars

Field value

1

uid[NUMBER]

Define your own columns and use it like uid55

Field value

0

uid[NUMBER]_[NUMBER]

Define your own columns for values in second level (maybe checkboxes or multiple selections) like uid55_0 and uid55_1

Field value

0

Configuration of export, list and charts  (prefix: tx_powermail_mod1.config)

Name

Explanation

What is this

Default if no tsconfig set

export.useTitle

Configure if title should be displayed in the first line of the export file (boolean)

Configuration of export file

1

export.dateformat

Configure your wanted date format in the export file (see http://php.net/manual/function.date.php for details)

Configuration of export file

Y-m-d

export.timeformat

Configure your wanted time format in the export file (see http://php.net/manual/function.date.php for details)

Configuration of export file

H:i:s

list.perPage

Change the number of listed mails per page in the backendform (default: 100)

Configuration of listing in backend

100

list.filterstart

Set your own static filter starttime, if you want to show or hide some old mails (like: 2008-12-23 12:19)

Configuration of listing in backend

[currentYear]-[currentMonth]-01 00:00

list.filterend

Set your own static filter endtime, if you want to show or hide some old mails (like: 2015-01-01 12:00)

Configuration of listing in backend

Current time like 2008-01-01 00:00

list.dateformat

Date format for the backend listing (see http://php.net/manual/function.date.php for details)

Configuration of listing in backend

Y-m-d H:i

chart.timeframe

Timestamp in seconds for the overall range of the chart (e.g. 1 year)

Configuration of the chart

2678400

chart.sectionframe

Timestamp in seconds for the every section within the overall timeframe (e.g. 3 month)

Configuration of the chart

604800

chart.title

Set the titles (pipe-separated) for the X-Axe

Configuration of the chart

4 Weeks ago|3 Weeks ago|2 Weeks ago|Last Week

Sending XLS export files via cronjob to the admin

Since powermail 1.4.12 it's possible to send a mail to a defined email address with a  xls export file as attachment

Using cronjob.php

http://www.yourdomain.org/typo3conf/ext/powermail/cli/cronjob.php?pid=1

Example tsconfig for the cronjob settings

# cronjob settings

tx_powermail_cli.exportmail {

time = 86400

body = See attachment

subject = New powermail export

email_receiver = alexander.kellner@einpraegsam.net

email_receiver_cc = alexander.kellner@conject.com

email_sender = noreply@einpraegsam.net

sender = powermail

}

tsconfig explanation for tx_powermail_cli

Name

Explanation

Default if no tsconfig set

time

Timeframe from current time to a time in the past. Within this timeframe all mails of the current pid will be exported

86400

body

Bodytext for the email

See XLS file in attachment

subject

Subject for the email

New powermail export email

email_receiver

Email address of the main receiver (THIS IS NEEDED)

email_receiver_cc

Email address of the cc receiver (could be empty)

email_sender

Email address of the sender

noreply@einpraegsam.net

sender

Sender name

powermail

Some notes

  1. You can use tsconfig tx_powermail_mod1 to make some more export settings (disable header, etc...) - see above

  2. Cronjob will only work if no other backend user is logged in at the same time

  3. You always have to set the pid from outside (see url above). What does this mean? Only mails from this pid will be attached to the mail and only tsconfig from this page will be used

  4. With time you can set the delta from now to the past. In this timeframe all mails will be exported. The timeframe is used in seconds (86400 is 1h and so on)

  5. You have to enter a mail address for the receiver – otherwise you will see an error

  6. You can test the cronjob by manually open the url above

  7. Your server don't supports cronjobs? No problem: cronjob.de with free cronjobs