Worked, end-to-end examples for the six ways to connect to the ITPishon sending platform: Drop-Folder, REST API, subscriber and list management, billing and statement mail, SMTP, and delivery reports.
These examples use OMICard, our email sending platform. Each one shows the moving parts, the order of operations, and working code or payloads. For the full field-by-field parameter reference (option codes, language codes, customer fields), see the companion API Reference.
Conventions used below
- [API host] is the API host our engineers give you when your account is set up. The public API host in the samples is api.itpison.com.
- Credentials are your OMICard login name and password. The newer REST API uses HTTP Basic auth. The WebAPI passes ManagerLoginName and ManagerPassword as fields.
- Replace any value shown in angle brackets or written as YOUR_....
- Sample email addresses use example.com.
- The samples below call https://.
Scenario index
| # | Scenario | Best when | Entry point |
|---|---|---|---|
| 1 | Drop-Folder | Large batch jobs from a back-office system | A job folder + Launch.txt |
| 2 | Transactional email via REST API | App or server sending JSON over HTTPS | POST /api/v1/Email |
| 3 | Subscribe, unsubscribe, lists | Sign-up forms, preference centres, CRM sync | Subscribe.aspx, Unsubscribe.aspx, Customer.aspx |
| 4 | Billing and statement (PDF) email | Monthly statements, invoices, personalised PDFs | Bill template + Email.aspx PDF fields |
| 5 | SMTP | Existing apps that already speak SMTP | smtp.itpison.com |
| 6 | Pulling delivery reports | Post-send analytics, bounce, open and click pulls | Report.aspx |
1. Drop-Folder integration
Send mail by dropping files into a directory. Your system writes one job folder per send into a watched request directory. The folder holds the list, content and attachments, plus a Launch.txt config file. A zero-byte .ok file signals "ready". We pick up the job and can write the results back.
Drop-Folder is built for large senders and API users, on Dedicated Server and Hybrid Cloud. It needs engineering on both sides: your engineers write the job files, and our engineers set up the watched location, the defaults and the result delivery with your team. An API Proxy inside your firewall is standard. SFTP is available on request. Drop-Folder is available on Dedicated Server and Hybrid Cloud only.
How it works
- The job folder name becomes the default
JobNameandRefNumber. Launch.txt(fixed filename) sits at the top of the job folder and holds the job settings.- Sub-folders hold the recipient list, content and attachments.
- A
<jobname>.okempty file (extension.ok) is placed last, next to the job folder, to mark the job complete. Only then is the job collected. - If you create a
Responsefolder (at the same level as the job folder), we write the return parameters there as a text file.
The .ok file must be the last thing you place. If it appears before the content and list files are fully written, the job is collected incomplete.
Watched request path
Our engineers give you the watched path for your account when Drop-Folder is set up with your team. Example format:
Email: \\<drop-folder host>\<your account>\FolderRequest\
Folder layout
| Location | File | Format | Encoding | Notes |
|---|---|---|---|---|
<job>\ |
Launch.txt (config) |
TXT | UTF-8 | Required |
<job>\CONVERT\LIST\ |
Recipient list | CSV, TXT | UTF-8 | |
<job>\CONVERT\BLACK\ |
Blacklist | TXT | UTF-8 | Also add ListOption in Launch.txt |
<job>\CONVERT\WHITE\ |
Whitelist | TXT | UTF-8 | Also add ListOption in Launch.txt |
<job>\CONVERT\HTML\ |
Content (same for all) | HTML, TXT, ZIP, RAR | UTF-8 | |
<job>\MERGE\ |
Content (different per recipient) | HTML, TXT, ZIP | UTF-8 | List sets Title: EmailContentSource = the content filename (with extension) |
<job>\ATTACHMENT\COMMON\ |
Attachment (same for all) | HTML, TXT, ZIP, RAR | ||
<job>\ATTACHMENT\LIST\ |
Attachment (different per recipient) | HTML, TXT, ZIP, RAR | List sets Title: CommonAttachment = the attachment filename (with extension) |
|
<job>\EXTRA\ |
Image | JPG, PNG | For a single in-body image; list sets Title: CommonAttachment, EmailContentSource = the image filename (with extension) |
Launch.txt common parameters
Launch.txt is plain Key=Value, one per line, in any order. Anything you omit falls back to the system default.
| Parameter | Meaning |
|---|---|
UserID |
User ID |
UserLoginName / LoginName |
Usable instead of UserID |
UserLoginPassword / LoginPassword |
Optional |
BlackList |
Add recipients as a blacklist inline (email addresses, comma-separated) |
BlackListUrl |
Blacklist file by URL; one BlackListUrl= line per file |
WhiteList |
Add recipients as a whitelist inline (comma-separated) |
WhiteListUrl |
Whitelist file by URL; one line per file |
CategoryName |
Job category (provided by us) |
CharacterSetID |
Language and charset. 112 = UTF-8 |
DelayTime |
Delay before sending (seconds) |
JobName |
Job name (defaults to folder name) |
RefNumber |
Job reference number (defaults to folder name) |
RefID |
Numeric job reference |
RefInfo |
Free-text job reference |
NextLaunchTime |
Absolute start time YYYY-MM-DD HH:MM:SS |
LaunchExpireTime |
Absolute launch deadline YYYY-MM-DD HH:MM:SS |
SendExpireTime |
Absolute send deadline YYYY-MM-DD HH:MM:SS |
PendingTimeInfo |
Pause windows you set, e.g. 02:00~04:00,06:30~08:30 |
LaunchType |
0 Production (default), 4 Test, 10 Small-batch, 60 OTP |
LaunchOption |
1 delete all job dirs and files after completion; 32 do not create a new send directory |
ListOption |
List processing, additive: 32 remove unsubscribers (needs RemoveUnsubscribe=<newsletter group id>), 64 remove duplicates, 128 remove blacklist, 256 remove whitelist. Add values to combine (e.g. 128+64=192). |
ListUrl |
Recipient list by URL (one line per file; CONVERT\LIST must be empty to use this) |
ReportClass |
0 no auto report (default), 1 produce a report for a single job |
ReportType |
Report type(s), comma-separated |
SendRetryRequest |
Resend count requested (compared against the sender machine's setting; the lowest value wins) |
ValidTime |
Job tracking validity (seconds) |
TriggerProcess |
Trigger-mail spec (see below) |
Email parameters:
| Parameter | Meaning |
|---|---|
From |
Sender address |
FromDisplay |
Sender display name |
Reply |
Reply-to address |
ReplyDisplay |
Reply-to display name |
Subject |
Subject |
Text |
Plain-text body |
HtmlUrl |
HTML body by URL (CONVERT\HTML must be empty to use this) |
TextUrl |
Plain-text body by URL (CONVERT\HTML must be empty to use this) |
SendValidTime |
Relative valid time (seconds) from launch; SendExpireTime wins if both are set |
JobOption |
Content options, additive: 8 HTML to plain text, 512 convert body to Unicode, 8192 auto-set charset from body, 16384 auto-set header charset from body, 262144 convert body file to web format, 2097152 archive page as a single .mht |
Trigger mail (a notification when job state changes):
TriggerProcess=TriggerProcessType;TriggerType;TriggerActionType;0;0;;TriggerActionParameter
Example: send notifications on "job started", "send failed" and "send complete":
TriggerProcess=0;120,124,125;2;0;0;;ops@example.com
TriggerProcessType:0send notification,1open notificationTriggerType(comma-separate):120job started,121job start error,122job start complete,123send started,124send failed,125send completeTriggerActionType: enter2for the "send email" actionTriggerActionParameter: the email address(es) to notify
Worked examples
Each one is "what file goes where".
1.1 Set recipients. Put the list in <job>\CONVERT\LIST\ (CSV or TXT). Add the recipient email column under an EmailAddress header (Title).
1.2 Use a blacklist. Put the blacklist in <job>\CONVERT\BLACK\ and add ListOption=128 (remove blacklist) to Launch.txt.
1.3 Use a whitelist. Put the whitelist in <job>\CONVERT\WHITE\ and add ListOption=256 to Launch.txt.
1.4 Many recipients, same content. List to <job>\CONVERT\LIST\ (CSV or TXT). Content to <job>\CONVERT\HTML\ (HTML, TXT, ZIP or RAR).
1.5 Many recipients, same attachment. List to <job>\CONVERT\LIST\. Attachment to <job>\ATTACHMENT\COMMON\ (HTML, TXT, ZIP or RAR).
1.6 Many recipients, different content. In the list, add the per-recipient content filename (with extension) under an EmailContentSource Title. Put those content files in <job>\MERGE\ (HTML, TXT or ZIP).
1.7 Many recipients, different attachment. In the list, add the per-recipient attachment filename (with extension) under a CommonAttachment Title. Put those attachments in <job>\ATTACHMENT\LIST\ (HTML, TXT, ZIP or RAR).
Return parameters
When the job folder is collected, we write the return values as a text file into the Response folder (same level as the job folder):
LaunchID: job numberRefNumber: reference number (same as folder name)ErrorCode:0= success, anything else = failureErrMsg: error message (empty on success)
2. Send transactional email via REST API
JSON over HTTPS. Best for app or server code sending a single transactional message, or a small batch with merge fields.
- Method:
POST - URL:
https://[API host]/api/v1/Email - Auth: required. HTTP Basic,
Authorization: Basic base64(LoginName:Password) - Content-Type:
application/json; charset=utf-8
Required fields
Subject: email subjectLaunchType:0Production,4Test,10Small-batch,60OTP- A list source (e.g.
List,CSVList,CSVListUrl, orb64CSVList) - One of the content fields (
Content,ContentUrl, orb64Content)
List formats
The list can come from several sources at once (e.g. both List and CSVList).
- Simple format: comma-separated addresses:
a@a.com,b@b.com,c@c.com - Match format: standard CSV with a header row, enabling per-recipient merge fields:
Name,Point,EmailAddress
A,100,a@a.com
B,90,b@b.com
C,150,c@c.com
List is also accepted as an array of objects (ListClass), with EmailAddress required and any extra columns used as custom merge fields:
[
{ "EmailAddress": "a@a.com", "Name": "A", "Point": 100 },
{ "EmailAddress": "b@b.com", "Name": "B", "Point": 95 },
{ "EmailAddress": "c@c.com", "Name": "C", "Point": 150 }
]
Merge fields
In the HTML body, %FieldName% is merged from the matching list column. Field names are case-sensitive. Example body:
Dear %Name%, your member points this period: %Point%.
Attachments
b64Attachment carries base64-encoded files (b64FileClass):
[
{ "FileName": "a.pdf", "Content": "(base64 string)" },
{ "FileName": "b.pdf", "Content": "(base64 string)" }
]
Worked example: request
POST https://[API host]/api/v1/Email
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Authorization: Basic <base64 of LoginName:Password>
Content-Type: application/json; charset=utf-8
{
"JobName": "Birthday card",
"LaunchType": 0,
"Subject": "Test email subject",
"List": [
{ "EmailAddress": "a@a.com", "Name": "A", "Point": 100 },
{ "EmailAddress": "b@b.com", "Name": "B", "Point": 95 },
{ "EmailAddress": "c@c.com", "Name": "C", "Point": 150 }
],
"CSVList": "Name,Point,EmailAddress\r\nX,100,x@x.com\r\nY,90,y@y.com\r\nZ,150,z@z.com",
"Content": "Dear %Name%,<br />Your member points this period: %Point%."
}
Worked example: response
A 200 status returns JSON:
{
"LaunchID": 2501,
"ErrorCode": 0,
"ErrorMessage": ""
}
Response error codes
| ErrorCode | Meaning |
|---|---|
0 |
Request created successfully (ErrorMessage empty) |
100 |
Internal error (e.g. I/O read/write error) |
102 |
Missing required field |
103 |
LoginName or Password invalid or not found |
900 |
Request source IP not authorised |
901 |
Login blocked (too many failed logins, retry later) |
1000 |
License invalid or expired |
Optional attributes are extensive: RefNumber, Priority, JobOption, ListOption, MaxLaunchCount, CharacterSetID, StartTime, ExpireTime, TrackingExpireTime, From, FromAddress, ReplyName, ReplyAddress, Importance. See the API Reference for the full table plus the JobOption and ListOption code lists and the language-code table.
3. Subscribe, unsubscribe and list management
The WebAPI handles newsletter membership and the customer database. These endpoints accept GET or POST (set on the server); use POST when uploading files. All values are Unicode. URL-encode special characters when using GET.
Required on every call: ManagerLoginName, ManagerPassword.
When you pass EmailAddress, the platform matches it against the existing customer database. If a matching customer exists, the action applies to that CustomerID. If not, a new customer record is created.
3a. Subscribe to a newsletter group: Subscribe.aspx
- URL:
https://[API host]/WebAPI/Subscribe.aspx - Required:
ManagerLoginName,ManagerPassword,Option=1(subscribe),NewsletterID(use0for the uncategorised group), andEmailAddress - Optional:
CustomerID,GroupID(tag ID),Note(subscription note)
Browser or GET:
https://api.itpison.com/WebAPI/Subscribe.aspx?ManagerLoginName=YOUR_API_LOGIN&ManagerPassword=YOUR_API_PASSWORD&option=1&EmailAddress=sample@example.com&NewsLetterID=YOUR_NEWSLETTER_GROUP_ID
PHP:
<?php
$url = 'https://api.itpison.com/WebAPI/Subscribe.aspx';
$postdata = array(
'ManagerLoginName' => 'YOUR_API_LOGIN',
'ManagerPassword' => 'YOUR_API_PASSWORD',
'Option' => '1',
'NewsLetterID' => 'YOUR_NEWSLETTER_GROUP_ID',
'EmailAddress' => 'YOUR_EMAIL_ADDRESS' );
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Returns: ERRORCODE, ERRORMSG, NewCustomer (True/False), CustomerID, GroupID, SubscribeTime, NewsLetterID, SubscribeID, Note.
Subscribe error codes: 100 Exception, 102 Incorrect Request, 110 Error Option, 111 GroupID doesn't exist, 112 CustomerID doesn't exist, 113 NewsLetterID doesn't exist, 114 EmailAddress not valid, 1000 No Licence.
3b. Unsubscribe: Unsubscribe.aspx
- URL:
https://[API host]/WebAPI/Unsubscribe.aspx - Required:
ManagerLoginName,ManagerPassword,Option=1(unsubscribe),NewsletterID(0= uncategorised), andEmailAddress - Optional:
CustomerID,Note,GroupID
Browser or GET:
https://api.itpison.com/WebAPI/Unsubscribe.aspx?ManagerLoginName=YOUR_API_LOGIN&ManagerPassword=YOUR_API_PASSWORD&option=1&NewsLetterID=YOUR_NEWSLETTER_GROUP_ID&EmailAddress=sample@example.com
PHP:
<?php
$url = 'https://api.itpison.com/WebAPI/UnSubscribe.aspx';
$postdata = array(
'ManagerLoginName' => 'YOUR_API_LOGIN',
'ManagerPassword' => 'YOUR_API_PASSWORD',
'Option' => '1',
'NewsLetterID' => 'YOUR_NEWSLETTER_GROUP_ID',
'EmailAddress' => 'YOUR_EMAIL_ADDRESS'
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Returns: ERRORMSG, ERRORCODE (0 success, 100 failure), NEWSLETTERID, UNSUBSCRIBEID, CUSTOMERID, NEWCUSTOMER (True/False), UNSUBSCRIBETIME, GROUPID.
3c. Manage customers: Customer.aspx
One endpoint, selected by Option. It covers the full add, delete, update, query and import lifecycle for the customer database.
- URL:
https://[API host]/WebAPI/Customer.aspx
Option |
Action | Key required fields |
|---|---|---|
1 |
Add customer | EmailAddress; optional GroupID, NewsLetterID |
2 |
Delete customer | CustomerID or EmailAddress (in that priority order) |
3 |
Update customer | CustomerID or EmailAddress; new values via NewName, NewEmailAddress, NewsLetterID, GroupID |
4 |
Query customer | CustomerID or EmailAddress (also returns tags, subscribe and unsubscribe info) |
5 |
Import customers | CustomerListFile or CustomerListUrl; ImportName; pair ImportDBOption with CompareDBOption |
6 |
List import records | ImportID (omit to list all import records for the account) |
1000 |
List DB field names and IDs | none |
For multi-tag or multi-group operations, pass comma-separated IDs (e.g. 1,2,5). On update, the supplied tags and groups replace the existing ones.
Add a customer, GET:
https://api.itpison.com/WebAPI/Customer.aspx?ManagerLoginName=YOUR_API_LOGIN&ManagerPassword=YOUR_API_PASSWORD&Option=1&EmailAddress=MEMBER_EMAIL
Add a customer, PHP:
<?php
$url = 'https://api.itpison.com/WebAPI/Customer.aspx';
$postdata = array(
'ManagerLoginName' => 'YOUR_API_LOGIN',
'ManagerPassword' => 'YOUR_API_PASSWORD',
'Option' => '1',
'Name' => 'CUSTOMER_NAME',
'NewsLetterID' => 'NEWSLETTER_GROUP_IDS', // separate multiple NewsLetterIDs with commas
'GroupID' => 'TAG_IDS', // separate multiple GroupIDs with commas
'EmailAddress' => 'EMAIL_ADDRESS' );
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Update a customer, PHP:
<?php
$url = 'https://api.itpison.com/WebAPI/Customer.aspx';
$postdata = array(
'ManagerLoginName' => 'YOUR_API_LOGIN',
'ManagerPassword' => 'YOUR_API_PASSWORD',
'Option' => '3',
'EmailAddress' => 'EMAIL_BEFORE_CHANGE',
'NewEmailAddress' => 'EMAIL_AFTER_CHANGE' );
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Import behaviour: ImportDBOption and CompareDBOption must be used together. CompareDBOption controls match handling (0 treat all as new, 2 update matches only, 4 add non-matches only, 5 add non-matches and update matches, and so on). ImportDBOption controls what happens to new and matched records (add to a tag, subscribe or unsubscribe group, remove associations, and so on). Choose either CompareDBField (numeric IDs) or CompareDBFieldName (names like EmailAddress) for the dedup columns, not both. Full code lists are in the API Reference.
Customer error codes: 100 Exception, 102 Incorrect Request, 110 Error Option, 111 not found by CustomerID or EmailAddress, 112 import file or URL not found, 113 GroupID not exist, 114 NewsLetterID not exist, 115 ImportID not exist, 116 EmailAddress not valid, 117 Customer not found, 118 key in EmailAddress, 119 Customer already exists, 120 EmailAddress already exists, 1000 No Licence.
4. Billing and statement (PDF) email
Billing emails (statements, invoices) combine a reusable approved template with per-recipient data, and can carry a personalised PDF. There are two pieces: the template module in the OMICard Admin Backend, and the send (Drop-Folder or Email.aspx).
4a. The billing template
Billing templates are managed in the OMICard Admin Backend (Messages, Bill Templates), with an optional approval workflow. The template body uses two special HTML comment tags.
Rotating banner or ad block: ITP_BEGIN_ROT=n ... ITP_END_ROT=n. Place an identifiable image inside. After upload, click that image to enter its ad editor. Content scheduled within its display window rotates. The number n is the block ID. It tells multiple ad blocks apart. Two ad blocks:
<tr>
<td> <!--ITP_BEGIN_ROT=1-->
<img src="./images/r1.jpg" alt="" />
<!--ITP_END_ROT=1-->
</td>
</tr>
<tr>
<td> <!--ITP_BEGIN_ROT=2-->
<img src="./images/r2.jpg" alt="" />
<!--ITP_END_ROT=2-->
</td>
</tr>
Message block: ITP_BEGIN_MSG=n ... ITP_END_MSG=n, with the %BILLMSG% string placed inside. %BILLMSG% is replaced at preview and send time with the message content, and clicking it in the editor opens the message editor. The number n is the block ID. If a block contains two or more message rows, the inner tagged markup repeats per message. Inside a <table>, the tags must sit inside a <td>...</td> so the editor can detect which block repeats.
<!--ITP_BEGIN_MSG=1-->
…
%BILLMSG%
…
<!--ITP_END_MSG=1-->
A two-message-block layout:
<table style="width: 720px;">
<tr>
<td colspan="3">
<img src="./images/bt1.jpg" alt="" />
</td>
</tr>
<tr>
<td colspan="3">
<!--ITP_BEGIN_MSG=1-->
<table>
<tr>
<td >
<img src="./images/bt2l.jpg" alt="" />
</td>
<td >%BILLMSG%</td>
<td >
<img src="./images/bt2r.jpg" alt="" />
</td>
</tr>
</table>
<!--ITP_END_MSG=1-->
</td>
</tr>
<tr>
<td colspan="3">
<img src="./images/bt3.jpg" alt="" />
</td>
</tr>
</table>
4b. Sending a statement using the template (Admin Backend)
The OMICard web app is not yet available for US accounts. Web-app steps apply once it opens; until then our engineers run them for you.
- Go to Messages, Bill Template, and pick the statement template you want.
- Click Load template subject and code. The subject is pre-filled from the template and you can edit it.
- Choose recipients, the same as any normal send.
- Click Send, set the send time, and dispatch.
- Receive the email and check that the merged statement and content render correctly.
4c. Attaching a personalised PDF via Email.aspx
To send a generated, merged PDF (for example a per-customer statement) programmatically, use the Email.aspx endpoint's attachment fields.
- URL:
https://[API host]/WebAPI/Email.aspx - Required:
ManagerLoginName,ManagerPassword, plus a content field and a recipient source.
| Field | Purpose |
|---|---|
AttachmentN |
Upload one or more files as attachments (Attachment, Attachment1 to Attachment99) |
PDFAttachmentN |
Upload one or more files, converted to PDF on the way out (no merge) |
MergePDFAttachmentN |
Upload files that are merged with list data, then converted to PDF, using the same merge syntax as the email body. Use this for personalised statements. Use plain PDFAttachmentN when no merge is needed, to avoid slowing generation. |
AttachmentPDFOption |
PDF conversion settings (see below) |
AttachmentLinkName |
Turn attachments into a download link instead; this prompt name must be set to enable link mode |
TrackAttacmentLink |
With AttachmentLinkName, track the attachment link. Default False; set True to track |
LinkPosition |
Download link position: 0 top-left, 1 top, 2 top-right, 3 bottom-left, 4 bottom, 5 bottom-right |
ListFileAttachment |
With an EmailListFile whose list has an Attachment column, convert to PDF. Default False; set True to convert |
AttachmentPDFOption is a comma-separated string of 10 parameters:
AttachmentPDFOption=ConvertOption,Encryption,HtmlOption,Permission,Width,Height,InsetX,InsetY,OwnerPassword,UserPassword
ConvertOption:0default converter (best performance);1use Microsoft Office components for custom-character (EUDC) fonts. This needs Office 2007 SP2+ on a logged-in machine and is much slower.Encryption:0none,140-bit,2128-bit,4128-bit AES,5256-bit.HtmlOption: for HTML-format PDF content:1hide background colour,2allow links,4allow tables (add to combine).Permission: bitwise permissions (assemble, modify, copy, print and so on); several requireEncryptionof1or higher, or2or higher.Width,Height: page size in points (1/72 inch); e.g. A4 =595 x 842, Letter =612 x 729.InsetX,InsetY: top-left content margin where layout begins.OwnerPassword: author password (read and change permissions); blank for none. Encryption must be enabled for it to take effect.UserPassword: reader password (read only); blank for none. Encryption must be enabled.
HTML form: attachment as a tracked download link:
<form id="form1" name="form1" method="post" enctype="multipart/form-data"
action="https://api.itpison.com/WebAPI/Email.aspx">
<p>
<input name="ManagerLoginName" type="hidden" id="ManagerLoginName" value="ENTER_LOGIN_NAME"/>
<input name="ManagerPassword" type="hidden" id="ManagerPassword" value="ENTER_PASSWORD"/>
</p>
<p>Subject: <input name="Subject" type="text" id="Subject"/></p>
<p>Recipient emails: <input name="EmailList" type="text" id="EmailList"/> (separate multiple recipients with commas)</p>
<p>Recipient list file: <input name="EmailListFile" type="file" id="EmailListFile"/></p>
<p>Email content: <input type="file" name="HtmlEmailContentFile" id="HtmlEmailContentFile"/></p>
<p>Attachment: <input type="file" name="Attachment" id="Attachment"/></p>
<p>Download link prompt name: <input name="AttachmentLinkName" type="text" id="AttachmentLinkName"/></p>
<p>Download link position: <input name="LinkPosition" type="text" id="LinkPosition" value=""/></p>
<p>Track attachment link: <input name="TrackAttacmentLink" type="text" id="TrackAttacmentLink" value=""/> (enter: True)</p>
</form>
Email.aspx is the full-featured WebAPI sender (merge, list sources, scheduling, auto-report dispatch). Its complete field set, the JobOption, ListOption and LinkOption code lists, and the CustomerInfo field reference are in the API Reference.
5. SMTP: Outlook or standard SMTP
Send through OMICard like any SMTP server. Point any SMTP-capable app (Outlook, a script, a server) at our relay and your outbound mail goes through our sending infrastructure, with no mail server for you to manage.
One-time setup
- Once your account is active, SMTP is available automatically. There is nothing to enable.
- Configure your client with the SMTP parameters below.
Before DNS is set up (SPF, DKIM, DMARC), do not test with your own corporate mailbox, because your corporate mail server may block it. Test with Gmail first, confirm SMTP works, finish the DNS records, then switch to corporate mail.
SMTP parameters
| Port | Encryption | Server |
|---|---|---|
25 |
None | smtp.itpison.com (backup smtp2.itpison.com) |
465 |
SSL | smtp.itpison.com (backup smtp2.itpison.com) |
25, 587 |
TLS (STARTTLS) | smtp.itpison.com (backup smtp2.itpison.com) |
Use smtp2.itpison.com when the connection to smtp.itpison.com fails. No special rate limit applies.
- Account and password: your OMICard login name and password (authentication required).
- The certificate on
smtp.itpison.comis the wildcard*.itpison.com. If a client rejects the certificate with a CN mismatch, connect tosmtp.itpison.comexactly (not an IP or alias).
Test it (no code)
Use any web-based SMTP tester, for example https://www.gmass.co/smtp-test, https://www.smtper.net/, or https://dnschecker.org/smtp-test-tool.php. Enter server smtp.itpison.com, port 25 or 465 (encrypted). A received test message confirms the setup.
Python example (SSL on 465)
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# SMTP server configuration
smtp_server = "smtp.itpison.com"
smtp_port = 465
smtp_username = "YOUR_LOGIN_NAME"
smtp_password = "YOUR_PASSWORD"
# Email content
from_email = "SENDER_EMAIL_ADDRESS"
from_name = "SENDER_NAME"
to_email = "RECIPIENT_EMAIL_ADDRESS"
to_name = "RECIPIENT_NAME"
reply_to_email = "REPLY_TO_EMAIL_ADDRESS" # Reply-To address
subject = "Test Mail"
html_body = """
<p>This is a test email.</p><br>
"""
# Create message container
msg = MIMEMultipart("alternative")
msg["From"] = f"{from_name} <{from_email}>"
msg["To"] = f"{to_name} <{to_email}>"
msg["Subject"] = subject
msg["Reply-To"] = reply_to_email # set the Reply-To header
# Attach the HTML body
msg.attach(MIMEText(html_body, "html"))
try:
# Connect to the SMTP server
server = smtplib.SMTP_SSL(smtp_server, smtp_port)
server.login(smtp_username, smtp_password)
# Send email
server.sendmail(from_email, to_email, msg.as_string())
server.quit()
print("Message has been sent")
except Exception as e:
print(f"Message could not be sent. Error: {str(e)}")
Advanced: control sending with X-Headers
Over SMTP you can pass send options as mail headers. They can be combined:
| Header | Controls |
|---|---|
X-JobName |
Job name |
X-RefNumber |
Job reference number |
X-NextLaunchTime |
Scheduled start time |
X-LaunchExpireTime |
Launch deadline |
X-LaunchType |
Launch type |
X-LaunchClass |
Launch class |
X-LaunchOption |
Launch option |
X-JobOption |
Job option |
X-ListOption |
List option |
X-LinkOption |
Link option (tracking) |
X-SendOption |
Send option |
Common X-LinkOption values: 64 don't track opens, 128 don't track links, 192 don't track opens or links. Common X-ListOption values: 1 keep all To headers, 2 keep all Cc headers, 65536 don't filter the list.
Example: don't track opens:
X-LinkOption: 64
From: test@example.com
To: recipient@example.com
Subject: Test Sample
This is Test Email
Python: adding a custom header:
import smtplib
from email.mime.text import MIMEText
# SMTP server configuration
smtp_server = "smtp.itpison.com"
smtp_port = 465
smtp_username = "YOUR_LOGIN_NAME"
smtp_password = "YOUR_PASSWORD"
# Email content
from_email = "test@example.com"
to_email = "recipient@example.com"
subject = "Test Sample"
custom_header_key = "X-LinkOption"
custom_header_value = "64"
body = "This is Test Email"
# Create email message
msg = MIMEText(body, "plain")
msg["From"] = from_email
msg["To"] = to_email
msg["Subject"] = subject
msg.add_header(custom_header_key, custom_header_value) # add the custom header
try:
# Connect to the SMTP server
server = smtplib.SMTP_SSL(smtp_server, smtp_port)
server.login(smtp_username, smtp_password)
# Send email
server.sendmail(from_email, to_email, msg.as_string())
server.quit()
print("Message has been sent")
except Exception as e:
print(f"Message could not be sent. Error: {str(e)}")
Troubleshooting
- Test fails: confirm your account is active, and that the SMTP parameters match this guide exactly.
- A web tester works but your own network does not reach port 25: home dynamic IP lines (fibre or ADSL), 4G and 5G connections, and shared hosting (for example WordPress hosts) commonly block outbound SMTP port 25. You typically need a fixed-IP line to use outbound port 25 directly.
6. Pulling delivery reports
After a send, pull delivery analytics (totals, opens, clicks, bounces, removals) through Report.aspx.
- URL:
https://[API host]/WebAPI/Report.aspx - Required:
ManagerLoginName,ManagerPassword,ReportPartID(report type),LaunchID(job number; accepts a comma-separated list like1225,1116),StartTime,EndTime(formatyyyy-MM-dd hh:mm:ss) - Optional:
ResponseMode,ReportCharacterSetID(17Traditional Chinese,117English),CustomColNameN(pick and rename returned columns)
Report types (ReportPartID)
| ID | Report |
|---|---|
20001 |
Email total send report |
20003 |
Email open report |
20005 |
Email click report |
21001 |
Open-detail download report |
2100199 |
Open-detail download report (fast version) |
21002 |
Click-detail download report |
21003 |
Bounce-detail download report |
21032 |
Successfully-sent download report |
30023 |
Combined read report |
31033 |
Removal download report |
ResponseMode
0: XML,DOWNLOADLINKas a UNC path (default)1: XML,DOWNLOADLINKas an HTTP URL2: render the report directly on the web response (failures still return XML)3: export the report as a downloadable file (failures still return XML)
Returns
ERRORCODE (0 success, 100 failure), ERRORMSG (empty on success), DOWNLOADLINK (the report download link).
Picking columns: CustomColNameN
CustomColName1 to CustomColName99 select and order the returned columns. Omit them to return all columns with default names. Column names are case-sensitive.
- Select two columns:
CustomColName1=EmailAddress&CustomColName2=SubmitTime - Select and rename a column:
CustomColName=EmailAddress,Email(returns onlyEmailAddress, renamed toEmail)
When calling via GET, URL-encode special characters (< to %3C, = to %3D, > to %3E, % to %25, & to %26).
Worked example: open-detail (fast), browser or GET
https://api.itpison.com/WebAPI/Report.aspx?ManagerLoginName=YOUR_API_LOGIN&ManagerPassword=YOUR_API_PASSWORD&ReportPartID=2100199&LaunchID=1234&StartTime=yyyy-MM-dd HH:mm:ss&EndTime=yyyy-MM-dd HH:mm:ss
Worked example: PHP
<?php
$url = 'https://api.itpison.com/WebAPI/Report.aspx';
$postdata = array(
'ManagerLoginName' => 'YOUR_API_LOGIN',
'ManagerPassword' => 'YOUR_API_PASSWORD',
'ReportPartID' => 'REPORT_TYPE_ID',
'LaunchID' => 'LAUNCH_ID_1, LAUNCH_ID_2',
'ResponseMode' => 'RESPONSE_MODE',
);
$opts = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($postdata)
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
Report error codes
100 Exception, 102 Incorrect Request, 103 Incorrect ReportPartID, 110 Invalid time format, 1000 No Licence.
Useful column sets
- Total send report (
20001): totals and counts per job:RecipCount,EmailCount,SendCount,AcceptCount, removal counts (RemoveUnsubscribeCount,RemoveDuplicateCount,RemoveReturnCount,RemoveBlackCount,RemoveWhiteCount), and timing (SubmitTime,SendTime,CompleteTime). - Bounce detail (
21003):EmailAddress,ReturnCode,Reason,DSNStatus,ReturnMsg,ReturnTime. - Click detail (
21002):EmailAddress,LinkName,NewUrl,SubmitTime, plus geo and agent fields (IP,City,Country,ISP,UserAgent). - Removal report (
31033):EmailAddress,Status(removal reason),SubmitTime. Reasons: (1) Invalid, (2) RemoveDuplicate, (3) RemoveReturn, (4) RemoveUnsubscribe, (5) RemoveBlackList, (6) RemoveWhiteList, (7) RemoveListProcess.
The full per-report column lists are in the API Reference.
Notes
- Auto-generate a report at send time: the WebAPI
Email.aspxsender can dispatch a report automatically after a send (AutoGenerateReport=True, withDispatchList,DispatchStartTime,DispatchCount,DispatchInterval). Combine this with Scenario 6 to receive reports without polling. - Cross-references: the detailed parameter tables (
JobOption,ListOption,LinkOption,LaunchOption,SendOption, the language-code table, and theCustomerInfofield list) are in the API Reference, not repeated here.
Questions about any of these? Email support@itpison.com.