واجهة برمجة تطبيقات البريد الإلكتروني لـ C Sharp

أرسل بريدًا إلكترونيًا باستخدام واجهة برمجة التطبيقات الخاصة بنا لـ C Sharp بسهولة وأمان. جرب API الخاص بنا لـ C Sharp مجانًا. سيساعدك فريقنا على دمج الإرسال التلقائي لرسائل البريد الإلكتروني وحملات التسويق عبر البريد الإلكتروني في تطبيقك في C Sharp.

وظيفة واجهة برمجة تطبيقات البريد الإلكتروني

إرسال بريد إلكتروني مع C Sharp

String afilnet_class="email";
String afilnet_method="sendemail";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_subject="Afilnet - Test email";
String afilnet_to="test@test.com";
String afilnet_email="email+test";
String afilnet_scheduledatetime="";
String afilnet_output="";

// Create an URL request
WebRequest request = WebRequest.Create("https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&subject="+afilnet_subject+"&to="+afilnet_to+"&email="+afilnet_email+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output);
	
// Get the response
WebResponse response = request.GetResponse ();

// Get the stream returned by the server
Stream dataStream = response.GetResponseStream();

// Open the stream
StreamReader reader = new StreamReader (dataStream);

// Read the Response
String result = reader.ReadToEnd ();

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemail";
data["user"] = "user";
data["password"] = "password";
data["subject"] = "Afilnet - Test email";
data["to"] = "test@test.com";
data["email"] = "email+test";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient();

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemail";
data["subject"] = "Afilnet - Test email";
data["to"] = "test@test.com";
data["email"] = "email+test";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient { Credentials = new NetworkCredential("user", "password") };

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);
String afilnet_class="email";
String afilnet_method="sendemail";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_subject="Afilnet - Test email";
String afilnet_to="test@test.com";
String afilnet_email="email+test";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"subject\":\""+afilnet_subject+"\",\"to\":\""+afilnet_to+"\",\"email\":\""+afilnet_email+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");
معامل وصف إجباري / اختياري
class=email الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=sendemail طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
subject هوية المرسل إلزامي
to البريد الإلكتروني الوجهة إلزامي
email رسالة البريد الإلكتروني ليتم إرسالها إلزامي
scheduledatetime تاريخ التسليم والوقت بالتنسيق yyyy-mm-dd hh:mm:ss اختياري
output تنسيق الإخراج من النتيجة اختياري
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • messageid
    • credits
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NO_ROUTE_AVAILABLE لا توجد مسارات متاحة للوجهة المشار إليها
NO_CREDITS رصيدك غير كافٍ

إرسال بريد إلكتروني من القالب باستخدام C Sharp

String afilnet_class="email";
String afilnet_method="sendemail";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_subject="Afilnet - Test email";
String afilnet_to="test@test.com";
String afilnet_email="email+test";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"subject\":\""+afilnet_subject+"\",\"to\":\""+afilnet_to+"\",\"email\":\""+afilnet_email+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");String afilnet_class="email";
String afilnet_method="sendemailfromtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_to="34600000000";
String afilnet_idtemplate="1000";
String afilnet_params="mobile:123456789,name:test+name";
String afilnet_scheduledatetime="";
String afilnet_output="";

// Create an URL request
WebRequest request = WebRequest.Create("https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&to="+afilnet_to+"&idtemplate="+afilnet_idtemplate+"¶ms="+afilnet_params+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output);
	
// Get the response
WebResponse response = request.GetResponse ();

// Get the stream returned by the server
Stream dataStream = response.GetResponseStream();

// Open the stream
StreamReader reader = new StreamReader (dataStream);

// Read the Response
String result = reader.ReadToEnd ();

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemailfromtemplate";
data["user"] = "user";
data["password"] = "password";
data["to"] = "34600000000";
data["idtemplate"] = "1000";
data["params"] = "mobile:123456789,name:test+name";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient();

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemailfromtemplate";
data["to"] = "34600000000";
data["idtemplate"] = "1000";
data["params"] = "mobile:123456789,name:test+name";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient { Credentials = new NetworkCredential("user", "password") };

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);
String afilnet_class="email";
String afilnet_method="sendemailfromtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_to="34600000000";
String afilnet_idtemplate="1000";
String afilnet_params="mobile:123456789,name:test+name";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"to\":\""+afilnet_to+"\",\"idtemplate\":\""+afilnet_idtemplate+"\",\"params\":\""+afilnet_params+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");
معامل وصف إجباري / اختياري
class=email الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=sendemailfromtemplate طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
to البريد الإلكتروني الوجهة إلزامي
idtemplate معرف القالب إلزامي
params المعلمات التي سيتم استبدالها في قالب التخصيص (< >) ، مفصولة بـ ، (فواصل) اختياري
scheduledatetime تاريخ التسليم والوقت بالتنسيق yyyy-mm-dd hh:mm:ss اختياري
output تنسيق الإخراج من النتيجة اختياري
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • messageid
    • credits
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NO_ROUTE_AVAILABLE لا توجد مسارات متاحة للوجهة المشار إليها
NO_CREDITS رصيدك غير كافٍ
NOT_ACCESS_TO_TEMPLATE لا يمكنك الوصول إلى القالب المحدد

إرسال بريد إلكتروني جماعي باستخدام C Sharp

String afilnet_class="email";
String afilnet_method="sendemailfromtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_to="34600000000";
String afilnet_idtemplate="1000";
String afilnet_params="mobile:123456789,name:test+name";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"to\":\""+afilnet_to+"\",\"idtemplate\":\""+afilnet_idtemplate+"\",\"params\":\""+afilnet_params+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");String afilnet_class="email";
String afilnet_method="sendemailtogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_subject="Afilnet - Test email";
String afilnet_idgroup="1";
String afilnet_email="Afilnet - Test email";
String afilnet_scheduledatetime="";
String afilnet_output="";

// Create an URL request
WebRequest request = WebRequest.Create("https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&subject="+afilnet_subject+"&idgroup="+afilnet_idgroup+"&email="+afilnet_email+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output);
	
// Get the response
WebResponse response = request.GetResponse ();

// Get the stream returned by the server
Stream dataStream = response.GetResponseStream();

// Open the stream
StreamReader reader = new StreamReader (dataStream);

// Read the Response
String result = reader.ReadToEnd ();

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemailtogroup";
data["user"] = "user";
data["password"] = "password";
data["subject"] = "Afilnet - Test email";
data["idgroup"] = "1";
data["email"] = "Afilnet - Test email";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient();

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemailtogroup";
data["subject"] = "Afilnet - Test email";
data["idgroup"] = "1";
data["email"] = "Afilnet - Test email";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient { Credentials = new NetworkCredential("user", "password") };

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);
String afilnet_class="email";
String afilnet_method="sendemailtogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_subject="Afilnet - Test email";
String afilnet_idgroup="1";
String afilnet_email="Afilnet - Test email";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"subject\":\""+afilnet_subject+"\",\"idgroup\":\""+afilnet_idgroup+"\",\"email\":\""+afilnet_email+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");
معامل وصف إجباري / اختياري
class=email الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=sendemailtogroup طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
subject Remitente إلزامي
idgroup معرف المجموعة الوجهة إلزامي
email رسالة البريد الإلكتروني ليتم إرسالها إلزامي
scheduledatetime تاريخ التسليم والوقت بالتنسيق yyyy-mm-dd hh:mm:ss اختياري
output تنسيق الإخراج من النتيجة اختياري
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • id
    • count
    • credits
    • destinations
      • messageid
      • destination
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها
NO_CREDITS رصيدك غير كافٍ

إرسال بريد إلكتروني جماعي من القالب باستخدام C Sharp

String afilnet_class="email";
String afilnet_method="sendemailtogroup";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_subject="Afilnet - Test email";
String afilnet_idgroup="1";
String afilnet_email="Afilnet - Test email";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"subject\":\""+afilnet_subject+"\",\"idgroup\":\""+afilnet_idgroup+"\",\"email\":\""+afilnet_email+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");String afilnet_class="email";
String afilnet_method="sendemailtogroupfromtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idtemplate="1000";
String afilnet_scheduledatetime="";
String afilnet_output="";

// Create an URL request
WebRequest request = WebRequest.Create("https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&idgroup="+afilnet_idgroup+"&idtemplate="+afilnet_idtemplate+"&scheduledatetime="+afilnet_scheduledatetime+"&output="+afilnet_output);
	
// Get the response
WebResponse response = request.GetResponse ();

// Get the stream returned by the server
Stream dataStream = response.GetResponseStream();

// Open the stream
StreamReader reader = new StreamReader (dataStream);

// Read the Response
String result = reader.ReadToEnd ();

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemailtogroupfromtemplate";
data["user"] = "user";
data["password"] = "password";
data["idgroup"] = "1000";
data["idtemplate"] = "1000";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient();

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "sendemailtogroupfromtemplate";
data["idgroup"] = "1000";
data["idtemplate"] = "1000";
data["scheduledatetime"] = "";
data["output"] = "";

// Create Web client 
var wb = new WebClient { Credentials = new NetworkCredential("user", "password") };

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);
String afilnet_class="email";
String afilnet_method="sendemailtogroupfromtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idtemplate="1000";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"idgroup\":\""+afilnet_idgroup+"\",\"idtemplate\":\""+afilnet_idtemplate+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");
معامل وصف إجباري / اختياري
class=email الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=sendemailtogroupfromtemplate طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
idgroup معرف المجموعة الوجهة إلزامي
idtemplate email.sendemailtogroupfromtemplate_idtemplate إلزامي
scheduledatetime تاريخ التسليم والوقت بالتنسيق yyyy-mm-dd hh:mm:ss اختياري
output تنسيق الإخراج من النتيجة اختياري
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • id
    • count
    • credits
    • destinations
      • messageid
      • destination
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة
NOT_ACCESS_TO_GROUP غير مسموح لك بالدخول إلى المجموعة المشار إليها
NO_CREDITS رصيدك غير كافٍ

الحصول على حالة تسليم البريد الإلكتروني مع C Sharp

String afilnet_class="email";
String afilnet_method="sendemailtogroupfromtemplate";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_idgroup="1000";
String afilnet_idtemplate="1000";
String afilnet_scheduledatetime="";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"idgroup\":\""+afilnet_idgroup+"\",\"idtemplate\":\""+afilnet_idtemplate+"\",\"scheduledatetime\":\""+afilnet_scheduledatetime+"\",\"output\":\""+afilnet_output+"\"}");String afilnet_class="email";
String afilnet_method="getdeliverystatus";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_messages="123456,123457,123458";
String afilnet_output="";

// Create an URL request
WebRequest request = WebRequest.Create("https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&messages="+afilnet_messages+"&output="+afilnet_output);
	
// Get the response
WebResponse response = request.GetResponse ();

// Get the stream returned by the server
Stream dataStream = response.GetResponseStream();

// Open the stream
StreamReader reader = new StreamReader (dataStream);

// Read the Response
String result = reader.ReadToEnd ();

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "getdeliverystatus";
data["user"] = "user";
data["password"] = "password";
data["messages"] = "123456,123457,123458";
data["output"] = "";

// Create Web client 
var wb = new WebClient();

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);

// Asign vars
var data = new NameValueCollection();
data["class"] = "email";
data["method"] = "getdeliverystatus";
data["messages"] = "123456,123457,123458";
data["output"] = "";

// Create Web client 
var wb = new WebClient { Credentials = new NetworkCredential("user", "password") };

// Execute POST petition
var response = wb.UploadValues("https://www.afilnet.com/api/http/", "POST", data);

// Get response
string responseString = Encoding.UTF8.GetString(response);
String afilnet_class="email";
String afilnet_method="getdeliverystatus";
String afilnet_user="user";
String afilnet_password="password";
String afilnet_messages="123456,123457,123458";
String afilnet_output="";
	
// Allow SSL/TLS config
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

// We create the webservice instance (Register Web Service first in project)
var service = new WebService.ApplicationServicesPortTypeClient();

// Call to WebService method
String response = service.call(afilnet_user, afilnet_password, afilnet_class, afilnet_method, "{\"messages\":\""+afilnet_messages+"\",\"output\":\""+afilnet_output+"\"}");
معامل وصف إجباري / اختياري
class=email الفئة المطلوبة: الفئة التي تم تقديم الطلب إليها إلزامي
method=getdeliverystatus طريقة الفصل المطلوبة: طريقة الفصل الذي تم تقديم الطلب إليه إلزامي
user المستخدم والبريد الإلكتروني لحساب Afilnet الخاص بك إلزامي
password كلمة المرور لحساب Afilnet الخاص بك إلزامي
messages قائمة معرفات الإرسال مفصولة بـ ، (فواصل) إلزامي
output تنسيق الإخراج من النتيجة اختياري
إجابه:
  • الحالة
  • النتيجة (إذا كانت الحالة = النجاح) ، سوف تتلقى هنا القيم التالية:
    • messageid
    • sms
    • deliverydate
    • deliverystatus
  • خطأ (إذا كانت الحالة = خطأ) ، هنا ستتلقى رمز الخطأ

رموز الخطأ:
الشفرة وصف
MISSING_USER المستخدم أو البريد الإلكتروني غير المدرجة
MISSING_PASSWORD كلمة المرور غير المدرجة
MISSING_CLASS الطبقة غير المدرجة
MISSING_METHOD طريقة غير المدرجة
MISSING_COMPULSORY_PARAM المعلمة الإجبارية غير المدرجة
INCORRECT_USER_PASSWORD مستخدم غير صحيح أو كلمة المرور
INCORRECT_CLASS فئة غير صحيحة
INCORRECT_METHOD طريقة غير صحيحة

إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ PHP إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Java إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ C Sharp إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Unix إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ ruby on rails إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ python إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Android إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Objective C / iPhone إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ SQL Server إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Oracle إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Node JS إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Go إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Scala إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Swift إرجاع حالة تسليم الرسائل القصيرة المعتمدة بـ Delphi

تقدم لك Afilnet طرقًا لتحسين الأمان عند استخدام واجهة برمجة التطبيقات الخاصة بنا مع {اللغة} ، وذلك بفضل إمكانية إنشاء عمليات الوصول وإمكانية تنشيط التصفية بواسطة IP.

أي واجهة برمجة تطبيقات للغة {اللغة} يجب أن أستخدمها؟

اكتشف مزايا وعيوب كل من واجهات برمجة التطبيقات الخاصة بنا. اكتشف واجهة برمجة التطبيقات الأفضل لبرنامجك في {اللغة}.

تتيح لك واجهة برمجة التطبيقات هذه الاتصال بنا من C Sharp لإرسال الطلبات عبر طلبات HTTP GET. يرسل هذا الطلب المعلمات في نفس عنوان URL مثل الطلب.

  • HTTP GET سهل التنفيذ للغاية
  • يتم إرسال المعلومات بدون تشفير (يمكن استخراج كلمات المرور من السجلات أو ذاكرة التخزين المؤقت)
  • الحد الأقصى للطلب حوالي 4000 حرف

تسمح لك واجهة برمجة تطبيقات طلب POST بالاتصال بواجهة برمجة التطبيقات الخاصة بنا من C Sharp عن طريق إرسال معلمات الطلب عبر معلمات HTTP POST. يتم إرسال المعلومات بشكل مستقل عن URL.

  • HTTP POST سهل التنفيذ
  • يتم إرسال المعلومات مشفرة
  • لا يوجد حد لحجم الطلب
  • أمان متوسط

تسمح واجهة برمجة تطبيقات المصادقة الأساسية باستخدام طلبات GET و POST باللغة C Sharp مع طبقة أمان إضافية ، لأنه في هذه الحالة يتم إرسال اسم المستخدم وكلمة المرور في رأس الطلب.

  • المصادقة الأساسية سهلة التنفيذ
  • يتم إرسال بيانات الوصول مشفرة
  • يعتمد حد الحجم على استخدام GET أو POST
  • أمان متوسط

يتيح لك SOAP إرسال طلبات بتنسيق XML مع C Sharp ، ويضيف SOAP طبقة أمان إضافية لطلبات API.

  • يعتبر تكامل SOAP أكثر تعقيدًا
  • يتم إرسال المعلومات مشفرة
  • لا يوجد حد لحجم الطلب
  • متوسطة / عالية الأمان

تتيح لك واجهة برمجة تطبيقات JSON الخاصة بنا إرسال الطلبات بتنسيق JSON مع {اللغة} ، بالإضافة إلى أن واجهة برمجة التطبيقات هذه تضيف بروتوكول oAuth 2.0 في المصادقة التي تتيح لك إضافة طبقة أمان إضافية.

  • يعتبر تكامل JSON oAuth 2.0 أكثر تعقيدًا
  • يتم إرسال المعلومات مشفرة
  • لا يوجد حد لحجم الطلب
  • حماية عالية

ربط C Sharp بواجهة برمجة التطبيقات البريد الإلكتروني الخاصة بنا

تتيح لك واجهة برمجة تطبيقات البريد الإلكتروني لدينا سهولة وسرعة وكفاءة. لن تستغرق العملية التي يتعين عليك اتباعها لتتمكن من استخدام واجهة برمجة التطبيقات الخاصة بنا سوى بضع دقائق. ستقدم لك شركتنا نسخة تجريبية مجانية حتى تتمكن من اختبار الخدمة.

01

سجل كعميل

من أجل الوصول إلى API ، يجب أن تكون عميل Afilnet. سيستغرق التسجيل بضع دقائق.

02

طلب نسخة تجريبية مجانية

ستقدم لك شركتنا رصيدًا تجريبيًا يتيح لك الاختبار باستخدام واجهة برمجة التطبيقات التي تحتاجها.

03

دمج API

قم بإجراء تكامل API باستخدام لغة البرمجة التي تختارها. إذا كان لديك أي أسئلة أو اقتراحات حول API ، فاتصل بنا

04

مرحبا بكم في Afilnet!

كل شيء جاهز! ، تمكن من تحسين اتصالاته مع Afilnet. نحن هنا لدعم API لدينا عند الحاجة إليها


تواصل مع فريقنا لطرح أي أسئلة من خلال طرق الاتصال التي نقدمها. سيحاول فريقنا أن يقدم لك حلاً فوريًا وسيساعدك في دمج API الخاص بنا في برنامجك.

جرب Afilnet مجانًا!

سجل مجانا وجرب Afilnet! نحن نقدم لك نسخة تجريبية مجانية من خدماتنا. *



(*) الترويج صالح فقط للشركات التي لم تستخدم خدمة Afilnet من قبل. عند طلب الرصيد المجاني ، قد تطلب Afilnet التحقق من معلومات شركتك


الرسائل القصيرة بالجملة · التسويق عبر البريد الإلكتروني · شبكة اجتماعية · رسالة فورية · شهادة · وأكثر بكثير
استمر معلومات مهمة حول ملفات تعريف الارتباط: إذا واصلت استخدام هذا الويب ، فسنفترض أنك تقبل شروط الاستخدام. ستجد المزيد من المعلومات في سياسة ملفات تعريف الارتباط الخاصة بنا.
طرق الدفع
تحويلة كهربية بالسلك
بطاقة إئتمان
Paypal
Western Union
Skrill
Crypto
Afilnet بلغتك

Copyright © 2023 Afilnet · كل الحقوق محفوظة