Email API Document. 2012 Webaroo Technology India Pvt. Ltd.



Similar documents
WatchManager Data Backup

Table of Contents. Table of Contents 3

MAPI Acceleration. Exinda ExOS Version Exinda, Inc

Integrating Fax Sending Services

Enprise License Management. Online and Manual License Management. May Enprise Enprise Job

e-builder Online User Assistance esignature Setup Guide

SETTING UP YOUR JAVA DEVELOPER ENVIRONMENT

Amazon Glacier. Developer Guide API Version

SecurEnvoy Reporting Wizard

HP AppPulse Mobile. Adding HP AppPulse Mobile to Your Android App

Chapter 10 Encryption Service

Building a Multi-Threaded Web Server

Utilities ComCash

iscripts Backuper 2009 iscripts

Universal Management Service 2015

Payroll Batch Processing Includes Direct Deposit

File Share Service User guide

IMPORT/EXPORT CUSTOMER REVIEWS. User Guide. User Guide Page 1

SRFax Fax API Web Services Documentation

Overview of Web Services API

Mail Programming Topics

Monitor Print Popup for Mac. Product Manual.

Policy Based Encryption Z. Administrator Guide

Cabot Consulting Oracle Solutions. The Benefits of this Approach. Infrastructure Requirements

See the Developer s Getting Started Guide for an introduction to My Docs Online Secure File Delivery and how to use it programmatically.

ResellerPlus - Bulk Http API Specification. (This Document gives details on how to send messages via the Bulk HTTP API for the RouteSms SMPP System)

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

Step by Step Bandwidth Management

Exinda How to Guide: SSL Acceleration

MSDG Services Integration Document Draft Ver 1.2

Cisco 7940 How To. (c) Bicom Systems

PolyU Staff Service. Mailing List Management. User Guide

Grandstream Networks, Inc. UCM6100 Series IP PBX Appliance CDR and REC API Guide

Perceptive Integration Server

Timeless Time and Expense Version 3.0. Copyright MAG Softwrx, Inc.

Configure a SOAScheduler for a composite in SOA Suite 11g. By Robert Baumgartner, Senior Solution Architect ORACLE

Yale Secure File Transfer User Guide

MailEnable Web Mail End User Manual V 2.x

Policy Based Encryption E. Administrator Guide

Policy Based Encryption E. Administrator Guide

Administration Guide. BlackBerry Resource Kit for BES12. Version 12.3

SecurEnvoy Windows Login Agent

Getting Started with Automizy

Pipeliner CRM Phaenomena Guide Importing Leads & Opportunities Pipelinersales Inc.

Work with XI 3.0 Java Proxies

Version 1.1. Release Date: May 10, 2015

Forumbee Single Sign- On

Administration Guide. BlackBerry Resource Kit for BES12. Version 12.1

The Essential Marketing Glossary

Track and Trace. Administration Guide

August 2012 Web Application for Enprise Job Costing SAP 2007A, SAP 2007A SP01, SAP 8.8 All regions

emobile Bulk Text User Guide Copyright Notice Copyright Phonovation Ltd

IBM Unica emessage Version 8 Release 5 February 19, Transactional Administration Guide

Connector for Microsoft Office SharePoint Server. ados.com Therefore Corporation, all rights reserved.

Wakefield Council Secure and file transfer User guide for customers, partners and agencies

Technical Guide DocuPRO Embedded Client for Xerox

1) Which of the following is a constant, according to Java naming conventions? a. PI b. Test c. x d. radius

The VerticalResponse API Guide

StarterPak: HubSpot and Dynamics CRM Lead and Contact Synchronization

CSE 1223: Introduction to Computer Programming in Java Chapter 7 File I/O

HOBOlink Web Services V2 Developer s Guide

Vodafone Business Product Management Group. Hosted Services Announcer Pro V4.6 User Guide

Java Web Services SDK

Using CSI s Web Messaging System: Imail URL: mail.csi.cuny.edu

bbc Developing Service Providers Adobe Flash Media Rights Management Server November 2008 Version 1.5

Sentinel EMS v7.1 Web Services Guide

How To Import A File Into The Raise S Edge

Distribution and Integration Technologies

Using Crystal Reports with Enprise Job

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Using CertAgent to Obtain Domain Controller and Smart Card Logon Certificates for Active Directory Authentication

Volume FIRST WALKTHROUGH. The 10-Minute Guide to Using Newsletter Services. First Walkthrough: the 10-Minute Guide

Contents INDEX...61 ECRM...1

API Guide v /11/2013

SAS Visual Analytics 7.1 for SAS Cloud. Quick-Start Guide

SOA Software API Gateway Appliance 7.1.x Administration Guide

Advanced HTTP API Documentation

You have got SASMAIL!

Vodafone Bulk Text. User Guide. Copyright Notice. Copyright Phonovation Ltd

JDOM Overview. Application development with XML and Java. Application Development with XML and Java. JDOM Philosophy. JDOM and Sun

Adding Signer Authentication to an Envelope

Ciphermail Gateway PDF Encryption Setup Guide

Getting Started with PRTG Network Monitor 2012 Paessler AG

Frequently Asked Questions for New Electric Mail Administrators 1 Domain Setup/Administration

Welcome to our marketing solution

How To Use Blackbaud Netcommunity

Adeptia Suite 6.2. Application Services Guide. Release Date October 16, 2014

vcloud Air Platform Programmer's Guide

Mass ing Techniques

Everbridge Suite Winter 2015 Release Notes

Release Notes. DocuSign Spring 15 Release Notes. Contents

MyFaxCentral User Administration Guide

. MIME is the protocol that was devised to allow non-ascii encoded content in an and attached files to an .

Transcription:

Email API Document 2012 Webaroo Technology India Pvt. Ltd. All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2012

1 Post Campaign Save and send posted date (customer only). 1.1 Rest API POST http://enterprise.smsgupshup.com/gatewayapi/rest method=ems_post_campaign userid=13579 password=secret v=1.1 name=my Name recipients=u1@example.com,u2@example.com subject=my Subject content=my Mail Content content_type=text/html attachment1= File attachment2= File attachment3= File attachment4= File attachment5= File 1.2 Parameters Parameters Userid Password This must in pure numeric format with no special characters. This must be the same password used to log on to Enterprise SMS GupShup website. v Default version is 1.1 Name Recipients Subject Content Name of the sender as it will appear to the receiver List of recipients email ids separated by commas Subject of the email Content of the mail content_type Text/plain, or text,html

Parameters Format Output format (text/xml/json) default is text Attachment1 Attachment2 Attachment3 Attachment4 Attachment5 Note: Post data format: The parameters are posted in MIME format separated by a boundary. Parameter encoding: All parameters have to be URL encoded before posting in MIME format. 1.3 Response success 1234567890 Campaign posted

2 Post Campaign to Uploaded Address The difference between this method and post campaign is that you do not need to type the email addresses of the recipients. You can upload a file containing all the email addresses and mail them your campaign when using this method. 2.1 Rest API POST http://enterprise.smsgupshup.com/gatewayapi/rest method=ems_post_campaign_to_uploaded_addresses userid=13579 password=secret v=1.1 name=my Name recipients_file=file subject=my Subject content=my Mail Content content_type=text/html 2.2 Parameters Parameters Userid Password This must in pure numeric format with no special characters. This must be the same password used to log on to Enterprise SMS GupShup website. V Default version is 1.1 Name recipients_file Subject Content content_type Format Attachment1 Attachment2 Name of the sender as it will appear to the receiver File containing the list of recipients email ids. Subject of the email Content of the mail Text/plain, or text,html Output format (text/xml/json) default is text

Parameters Attachment3 Attachment4 Attachment5 Note: Post data format: The parameters are posted in MIME format separated by a boundary. Parameter encoding: All parameters (excluding file parameters: recipients_file) have to be URL encoded before posting in MIME format. Recipients_file format: The uploaded recipients file should be a file in CSV format with one email id per line. 2.3 Response Success 1234567890 Campaign posted

3 Upload Campaign This method allows you to upload your newsletter (in html format). Upload all the files of your newsletter and send it to the recipients instead of typing mail content. 3.1 Rest API POST http://enterprise.smsgupshup.com/gatewayapi/rest method=ems_upload_campaign userid=13579 password=secret v=1.1 name=my Name recipients=u1@example.com,u2@example.com subject=my Subject newsletter_file=file content_type=text/html 3.2 Parameters Parameters Userid Password This must in pure numeric format with no special characters. This must be the same password used to log on to Enterprise SMS GupShup website. v Default version is 1.1 Name Recipients Subject Name of the sender as it will appear to the receiver List of recipients Subject of the email newsletter_file File containing mail body (in ZIP format) content_type Format Attachment1 Attachment2 Attachment3 Text/plain, or text,html Output format (text/xml/json) default is text

Parameters Attachment4 Attachment5 Note: Post data format: The parameters are posted in MIME format separated by a boundary. Parameter encoding: All parameters (excluding file parameters: newsletter_file) have to be URL encoded before posting in MIME format. newsletter_file format: The uploaded newsletter file should be a ZIP file with one HTML file. 3.3 Response success 1234567890 Campaign posted

4 Upload Campaign to Uploaded Addresses This method is similar to Upload Campaigns. Here, instead of typing email addresses you can upload a file containing the list of recipients email ids. 4.1 Rest API POST http://enterprise.smsgupshup.com/gatewayapi/rest method=ems_upload_campaign_to_uploaded_addresses userid=13579 password=secret v=1.1 name=my Name recipients_file=file subject=my Subject newsletter_file=file content_type=text/html 4.2 Parameters Parameters Userid Password This must in pure numeric format with no special characters. This must be the same password used to log on to Enterprise SMS GupShup website. v Default version is 1.1 Name recipients_file Subject Name of the sender as it will appear to the receiver File containing the list of recipients Subject of the email newsletter_file File containing mail body (in ZIP format) content_type Format Attachment1 Attachment2 Attachment3 Text/plain, or text,html Output format (text/xml/json) default is text

Parameters Attachment4 Attachment5 Note: Post data format: The parameters are posted in MIME format separated by a boundary. Parameter encoding: All parameters (excluding file parameters: newsletter_file) have to be URL encoded before posting in MIME format. Recipients_file format: The uploaded recipients file should be a file in CSV format with one email id per line. newsletter_file format: The uploaded newsletter file should be a ZIP file with one HTML file. 4.3 Response success 1234567890 Campaign posted 4.4 JAVA class code import java.io.file; import java.net.urlencoder; import java.text.simpledateformat; import java.util.calendar; import java.util.date; import java.util.timezone; import java.util.concurrent.atomic.atomicinteger; import org.apache.commons.httpclient.httpclient; import org.apache.commons.httpclient.methods.postmethod; import org.apache.commons.httpclient.methods.multipart.filepart; import org.apache.commons.httpclient.methods.multipart.multipartrequestentity; import org.apache.commons.httpclient.methods.multipart.part; import org.apache.commons.httpclient.methods.multipart.stringpart; public class NewBlastSubmission {

private void sendfiletoenterprise(string url, String filename) { try { HttpClient client = new HttpClient(); PostMethod method = new PostMethod(url); File f = new File(filename); /* http://enterprise.smsgupshup.com/gatewayapi/rest?method=ems_post_campaign&u serid=2000111940&password=kvs2bt&v=1.1&name=karad Urban&recipients=pritamshah@gmail.com&subject=Test e-statement&content=testing e-statement from API gupshup&content_type=text/html&attachment1= C:\Users\Administrator\Downloads\1001005064119.pdf */ Part[] parts = { new StringPart("method", "EMS_POST_CAMPAIGN"), new StringPart("userid", "2000111940"), new StringPart("password", "Kvs2bT"), new StringPart("v","1.1"), new StringPart("recipients", URLEncoder.encode("pritamshah@gmail.com", "UTF-8")), new StringPart("subject", URLEncoder.encode("Test e-statement", "UTF-8")), new StringPart("content", "Testing e-statement from API gupshup"), new StringPart("content_type", "text/html"), new FilePart("attachment0", f),new StringPart("name", "Karad Urban") }; /* new StringPart("method", "EMS_POST_CAMPAIGN"), new StringPart("userid", "2000111940"), new StringPart("password", "Kvs2bT"), new StringPart("recipients", "pritamshah@gmail.com"), new StringPart("subject", URLEncoder.encode("Test e-statement", "UTF-8")), new StringPart("content", ""), new StringPart("format", "json"), new StringPart("filetype", "zip"), new StringPart("v", "1.1"), new StringPart("mask", mask), new StringPart("dnd", "true"), new FilePart(f.getName(), f), Date(scheduleTime))), new StringPart("timestamp", dateformat.format(new */ method.setrequestentity(new MultipartRequestEntity(parts, method.getparams())); int statuscode = client.executemethod(method);

System.out.println( filename + "," + method.getresponsebodyasstring()); } } System.out.println(statusCode); catch (Exception e) { } e.printstacktrace(); public static void main(string[] args) { String url = "http://enterprise.smsgupshup.com/gatewayapi/rest"; String filedir = "/home/asmita/desktop/simpleemailtest.html.zip"; new NewBlastSubmission().sendFileToEnterprise(url, filedir); } }