This section is only for software developer, which are interested in including SuperMailer in their own applications, to handle email communication.
One possibility to control SuperMailer in your application is through an ini file. All commands in this file will be used as command line parameter. An default ini file can be found in your SuperMailer directory as _AUTOCFG.ini.
Execute SuperMailer with a ini file
Execute SuperMailer with parameter /AUTOCFGFILE:<directory and ini
filename>,
i.e.. c:\program files\supermailer\sm.exe /AUTOCFGFILE:c:\ainifile.ini
hint: contains a directory or a file name of your ini file blanks so enclose
them in quotation marks,
example: c:\program files\supermailer\sm.exe /AUTOCFGFILE:"c:\template for
an email\myfile.ini"
You can start SuperMailer via ShellExecute(params), CreateProcess(params) or WinExec(params), all parameters have to be correct.
See also
Command line parameters
Retrieve SuperMailer install path
To retrieve the install path read the value InstallPath from registry key HKEY_CURRENT_USER\Software\Mirko Boeer Software\SuperMailer\Options . The name of executable file is always sm.exe.
Check if SuperMailer is up and running
SuperMailer should be only started once a time. To check SuperMailer is running you can check the mutex SuperMailer32 are exists.
Example in Delphi 7
Var
hnd : THandle;
hnd := CreateMutex(nil, True, 'SuperMailer32');
If (GetLastError = ERROR_ALREADY_EXISTS) Then
// SuperMailer is running
else
CloseHandle(hnd); // SuperMailer doesn't run, free handle
Ini file structure
This ini file contains of more than one section, which contains informations and parameters.
hint:
Section/Parameter | description |
[COMMON] |
|
VERSION=1.0 |
Please state version 1.0, this maybe important for later changes. |
|
|
[OPTIONS] |
|
PROJECTFILENAME= |
define directory and filename of your project-file. if file
exists and OPENEXISTING=TRUE
then this file will be opened.
hint: An existing file will be overwritten without warning. |
OPENEXISTING=TRUE|FALSE |
State TRUE to open an existing project file. FALSE to create
a new one.
hint: if your statement is TRUE, then section [SENDOPTIONS] will be ignored. your projecfile must contain settings about send-options and whose properties. |
MAILSUBJECT= |
state the subject of your mail state a subject if want your mail sended |
SENDMAILS=TRUE|FALSE |
state TRUE if you want SuperMailer closed after delivery or FALSE if not |
CREATEREPORT=TRUE|FALSE |
state TRUE if you want an HTML-report file after email delivery |
EMAILCOLUMNNAME= |
state the field identifier containing the email address. This information is important to SuperMailer to know where it can find the column containing all email addresses, if its left blank or has incorrect data the user will be ask to choose a field. |
RECIPIENTSGROUP= | Name of recipients group. This option will used only for existing project files (OPENEXISTING=TRUE). Leave this option blank to use the first recipients group. |
|
|
[MAILTEXT] |
|
FORMAT=HTML|TEXT |
These defines the email-type: state HTML for HTML-mail and TEXT for plain text mail. |
HTMLFILE= |
If you have chosen HTML-type, you can now define a HTML-file including path which should be used as email text. |
TEXTFILE= |
define an text file including path. If you have chosen HTML as type this text file will be used as alternative text part. |
|
|
[ATTACHMENTS] |
|
FILE1= |
define all file attachments: <unique
name>=<complete path and filename> example
FILE1=c:\autoexec.bat |
|
|
[SENDOPTIONS] |
(see Menu Projects - email settings |
MAILCHARSET=iso-8859-1|iso-8859-2|iso-8859-3|iso-8859-4|windows-1251 |
Define email encoding, all possible identifiers are stated. default is iso-8859-1 this is valid for all European emails. |
MAILPRIORITY=NORMAL|HIGH|HIGHEST |
state mail priority |
FROM= |
state sender email-address |
REALNAME= |
state shown name |
REPLYTOADDRESS= |
state reply email address. |
MULTIPART=TRUE|FALSE |
only for HTML-emails. state TRUE to create an multipart email and FALSE to send an pure HTML-mail. |
SMAPI=TRUE|FALSE |
state TRUE to send via Simple Mail API |
OUTLOOK=TRUE|FALSE |
state TRUE to send via Microsoft Outlook |
SMTP_DIRECT=TRUE|FALSE |
state TRUE to send directly to a mail server used by the recipient |
SMTP=TRUE|FALSE |
state TRUE to send via SMTP server owned by your provider |
SMTP_SERVERNAME= |
define SMTP servers name. |
SMTP_PORT=25 |
define SMTP port default 25. |
TIMEOUT=60 |
define SMTP server timeout default 60sek. |
THREADS= |
define number of threads for mail delivery; default is 5 |
SMTP_AUTH=TRUE|FALSE |
TRUE SMTP authentification necessary |
SMTP_USERNAME= |
SMTP username for SMTP authentification |
SMTP_PASSWORD= |
SMTP password for SMTP Authentification |
POP3_AUTH=TRUE|FALSE |
TRUE use pop3 authentification. |
POP3_SERVER= |
define pop3 server |
POP3_PORT=110 |
define pop3 port default 110 |
POP3_USERNAME= |
username for pop3 server |
POP3_PASSWORD= |
password for pop3 server |
RETURN_RECEIPT=TRUE|FALSE |
TRUE - notice of receipt |
BCCTOMYSELF=TRUE|FALSE |
TRUE - BC of every mail to your own email address |
ESMTP=TRUE|FALSE |
this should be ever FALSE. |
BREAK=1 |
time between two mails: default 1 ms |
MAILSENDBREAK=TRUE|FALSE |
break between a number of mails? |
MAILBREAKAFTER=2 |
break after X emails |
MAILBREAKAFTERWAITTIME=1 |
break in seconds |
BCCSEND=TRUE|FALSE |
TRUE delivery with BCC active |
BCCMAXRECIPIENTSPERMAIL=1 |
max number of BCC recipients, number have to be > 0! |
BCCTOEMAILADDRESS= |
define the email address in field "An/To" this statement have to be correct! |
|
|
[DEFAULTFIELDS] |
|
0=Name |
Define all default fields, which SuperMailer should show in your list of all the recipients. If you don't import field-structures so you have to define an field structure for the chosen import type in section [<importvariant>_FIELD_ASSIGNMENT] If you import a text file you have to define a structure in this text file. |
1=Vorname |
|
2=EMail |
|
3=Anrede |
|
|
|
[IMPORT] |
This import section will be scanned in this order, if an import type is not left blank, than all other types will be ignored. |
TEXTFILE= |
define path and file name of the import file. |
XLSFILE= |
define path and file name of the import excel file. |
WABFILE= |
define path and file name of the import WAB file (windows address book). |
OUTLOOKIMPORT=TRUE|FALSE |
TRUE, import Outlook data |
DBIMPORT=TRUE|FALSE |
TRUE, import from database |
INTERNETFILE= | Specify URL to import recipients data from an internet URL. |
|
|
[TEXTFILE_IMPORT_OPTIONS] |
define options for text file import |
SEPARATOR= |
separator between data values: example ;. for tab use \t |
NOHEADLINE=TRUE|FALSE |
TRUE, there is no structure information in the first row |
DONTCLEARCURRENTLIST=TRUE|FALSE |
TRUE, don't deletes current list, appends data |
ONLYEMAILADDRESSES=TRUE|FALSE |
TRUE, list contains email addresses only, one per row |
NOEMAILCHECK=TRUE|FALSE |
TRUE, no email address validation |
REMOVEQUOTES=TRUE|FALSE |
TRUE, deletes quotation marks |
TRIMSPACES=TRUE|FALSE |
TRUE, delete leading or following space_characters |
OEMTOANSI=TRUE|FALSE |
TRUE, convert DOS to ANSI; default FALSE |
|
|
[WABFILE_IMPORT_OPTIONS] |
only for WAB import |
DONTCLEARCURRENTLIST=TRUE|FALSE |
TRUE, don't delete current list |
|
|
[WABFILE_FIELD_ASSIGNMENT] |
only for WAB import |
NAME= |
define a field name which exists in SM field identifiers. left blank - no import |
FIRSTNAME= |
define a field firstname which exists in SM field identifiers. left blank - no import |
TITEL= |
define a field title which exists in SM field identifiers. left blank - no import |
EMAIL= |
define a field email which exists in SM field identifiers. left blank - no import |
MAINFAXNUMBER= |
define a field mainfaxnumber which exists in SM field identifiers. left blank - no import |
BUSINESSFAX= |
define a field businessfax which exists in SM field identifiers. left blank - no import |
COMPANYNAME= |
define a field companyname which exists in SM field identifiers. left blank - no import |
|
|
[OUTLOOK_IMPORT_OPTIONS] |
only Outlook import |
OUTLOOKFOLDERNAME= |
name contact folder, default Contacts |
OUTLOOKCATEGORY= |
define category, if any then all contacts will be imported. |
DONTCLEARCURRENTLIST=TRUE|FALSE |
TRUE, don't delete current list |
|
|
[OUTLOOK_FIELD_ASSIGNMENT] |
only outlook import, one assigment necessary! |
email address 1= Name email-Adresse 1= email-Adresse 2= Name email-Adresse 2= email-Adresse 3= Name email-Adresse 3= FirstName= LastName= Firstname and LastName= Nick Name= Title= usw. |
See example file SuperMailer_AUTOCFG.INI
define SM field identifier after the equation mark example email address 1=EMail |
|
|
[XLSFILE_IMPORT_OPTIONS] |
only excel import. |
WORKSHEET=1..N |
define excel spreadsheet: default is 1. |
NOHEADLINE=TRUE|FALSE |
TRUE, Excel file has no structure info in first row |
DONTCLEARCURRENTLIST=TRUE|FALSE |
TRUE, don't delete current list. |
REMOVEQUOTES=TRUE|FALSE |
TRUE, delete quotation marks |
TRIMSPACES=TRUE|FALSE |
TRUE, delete leading and following blanks |
|
|
[DB_IMPORT_OPTIONS] |
only database import. |
CONNECTIONSTRING= |
define database connection string. |
TABLENAME= |
define table name which should be imported. When you have defined an own SQL query (DBSQLQuery=) than this value will be ignored. |
ASSIGN_TABLE_STRUCTURE=TRUE|FALSE |
TRUE, if table structure an SM field identifier are 1:1 the same |
DONTCLEARCURRENTLIST=TRUE|FALSE |
TRUE, don't delete current list, deleted if new structure. |
DBSQLQuery= | Specify your own SQL query to import recipients data. |
|
|
[DB_FIELD_ASSIGNMENT] |
only for database import, statement is necessary if ASSIGN_TABLE_STRUCTURE=FALSE |
TABLE_FIELD_NAME1..n=RECIPIENT_LIST_FIELD_NAME1..n |
define an fieldname from your table, followed by an equation
mark and state the corresponding SM fields identifier. example:
left table structure... middle equation mark... right SM field identifier. Name=Name |
|