Skip to content

Instantly share code, notes, and snippets.

View expressmailing's full-sized avatar

Express-Mailing expressmailing

View GitHub Profile
@expressmailing
expressmailing / sms_push_response.xml
Created December 18, 2017 13:55
Retour du push SMS
<?xml version="1.0" encoding="utf-8"?>
<response>
<push status="ok" status-detail="on_demand sms created" pages="2" />
</response>
@expressmailing
expressmailing / api_sms_campaign_exemple_push.xml
Created December 18, 2017 13:19
API campagne SMS exemple push XML
<request login="demo" password="demo">
<push media="sms"
type="campaign"
name="ref-alphanum"
start_date="01/01/2017 15:00:00"><!--n'oubliez pas le chevron de fermeture !)-->
<message type="text">Corps de mon SMS</message>
<sms_config validity="7" sender_id="XPMAILING" />
<recipients>
<add target="+33 600000000" ref_target="uniq-id-for-report"/>
</recipients>
@expressmailing
expressmailing / api_sms_unit_exemple_push.xml
Last active December 18, 2017 13:17
API SMS unitaire exemple push XML
<request login="demo" password="demo">
<push media="sms"
type="on_demand"
name="ref-alphanum"
start_date="01/01/2015 15:00:00"><!--(n'oubliez pas le chevron de fermeture !)-->
<message type="text">Ceci est mon premier test sms</message>
<sms_config validity="7" />
<recipients>
<add target="+33 600000000" ref_target="uniq-id-for-report" />
@expressmailing
expressmailing / send_fax_unit_vb6.vb
Created December 15, 2017 15:54
Exemple en VB 4/5/6 d'envoi de fax unitaire
Private Sub Form_Load()
' Récupération du document en base64
' ---------------------------------------
Dim filename As String, file() As Byte, filnum As Integer, binary As String
filename = "test-fax.doc"
filnum = FreeFile()
Open filename For Binary As filnum
file = InputB(LOF(filnum), #filnum)
Close filenum
@expressmailing
expressmailing / send_fax_unit.vb
Created December 15, 2017 15:07
Exemple en VB d'envoi de fax unitaire
Public Sub Main(ByVal Args() As String)
' Récupération du document en base64
' ---------------------------------------
Dim filename As String = "test-fax.doc"
Dim file() As Byte = System.IO.File.ReadAllBytes(filename)
Dim binary As String = System.Convert.ToBase64String(file, 0, file.Length)
' Création du XML à poster
' --------------------------
@expressmailing
expressmailing / send_fax_unit.cs
Last active January 2, 2018 15:59
Exemple en C# d'envoi de fax unitaire
static void Main(string[] args)
{
// Récupération du document en base64
string filename = "test-fax.doc";
byte[] file = System.IO.File.ReadAllBytes(filename);
string binary = System.Convert.ToBase64String(file, 0, file.Length);
// Création du XML à poster
var xml = @"<request login=""your-login"" password=""your-password"">
@expressmailing
expressmailing / fax_add_redlist.xml
Last active November 27, 2017 16:13
Structure de la commande
<personnal_redlist media="fax">
<add target="+33 123456789" comment="Le client a renvoyé un fax raturé"/>
<remove target="+33 300000001"/>
</personnal_redlist>
@expressmailing
expressmailing / exemple_notifications.xml
Created November 23, 2017 16:41
Exemple de notifications
<?xml version="1.0" encoding="utf-8"?>
<response>
<notifications status="ok" position="17694933">
<notification id-notifcation="17694930">
<status>PROGRESS</status>
<date>02/03/2017 09:19:27</date>
<state-desc>RAS</state-desc>
<sms-state>0</sms-state>
<ref_target>uniq-sms-id-12</ref_target>
<ref_group>Campagne SMS Test</ref_group>
@expressmailing
expressmailing / fax_notification_request.xml
Last active December 18, 2017 14:04
Récupération des notifications fax
<request login="demo" password="demo">
<notifications media="fax"
seek="id-notification"
max="100" />
</request>
@expressmailing
expressmailing / fax_push_response_xml.xml
Last active December 18, 2017 13:54
Retour du push fax
<?xml version="1.0" encoding="utf-8"?>
<response>
<push status="ok" status-detail="on_demand fax created" pages="2" />
</response>