Bulk Email Script in PHP and MySQL Database

In this post, I will show you how we can send an email to multiple receivers using simple PHP script. This script also shows how we can send bulk if we have server limitation on number of emails can be sent in period of time.  Many web hosting provider do not support bulk emails so I have set this script to come out of this limitation.

This Bulk Email script can send HTML email. You can also use this script to send promotional and marketing emails.

In this tutorial we will create three files. First file is HTML content of email, second file is the actual code which sends emails to multiple address one at a time and third file is allowing receivers to unsubscribe from email list.

sample.html

<p>Hello there</p>
<p>This is sample email file</p>
<br>
<p>Thanks,</p>
<p>Administrator</p>

sendmail.php

<?php

$con = mysql_connect("localhost","dbuser","dbpass"); // replace dbuser, dbpass with your db user and password
mysql_select_db("dbname", $con); // replace dbname with your database name
/*
To use this script database table must have three fields named sno, email and sub_status
*/
$query = "select sno, email from dbtable where sub_status = 'SUBSCRIBED'";
$result = mysql_query($query, $con);
$emails = array();
$sno = array();
while($row=mysql_fetch_assoc($result)){
	$sno[] = $row['sno']; // this will be used to unsubscribe the user
	$emails[]=$row['email']; // email id of user
}
/* you can also get email id data from CSV using below code */
//$file =  file_get_contents("travel_database.csv"); 
//$emails = explode(",",$file);

/* count.txt is used to store current email sent number/count */
$count =  file_get_contents("count.txt");
for($i=$count;$i<count($emails);$i++)
{
	$to  = $emails[$i];

	// subject
	$subject = 'Set Your Title Here';

	// message
	$message = file_get_contents("sample.html"); // this will get the HTML sample template sample.html
	$message .= '<p><a href="http://yourdomain.com/path-to-folder/unsubscribe.php?id='.$sno[$i].'&username='.$emails[$i].'">Please click here to unsubscribe.</a></p>
	</body>
	</html>';
	// To send HTML mail, the Content-type header must be set
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

	// Additional headers
	//$headers .= "To: $to" . "\r\n";
	$headers .= 'From: Name <info@yourdomain.com>' . "\r\n";
	//$headers .= 'Cc: sendcc@yourdomain.com' . "\r\n";
	//$headers .= 'Bcc: sendbcc@yourdomain.com' . "\r\n";

	// Mail it
	if(mail($to, $subject, $message, $headers)) {
		$file = fopen("mailsentlist.txt","a+"); // add email id to mailsentlist.txt to track the email sent
		fwrite($file, $to.",\r\n");
		fclose($file);
	}
	else
	{
		$file = fopen("notmailsentlist.txt","a+"); // add email to notmailsentlist.txt here which have sending email error
		fwrite($file, $to.",\r\n");
		fclose($file);
	}

	if(($i-$count)>=200) // this will send 200 mails from database per execution
	{	
		$filec = fopen("count.txt",'w'); // store current count to count.txt
		fwrite($filec, $i);
		fclose($filec);
		break;
	}
}//for end
$filec = fopen("count.txt",'w'); // store fine count to count.txt this will be used as a start point of next execution
fwrite($filec, $i);
fclose($filec);

Replace “http://yourdomain.com/path-to-folder/” with your path to unsubscribe.php

You can set the cron job on sendmail.php on particular time frame. For example if you hosting provider support only 100 mail per hour than you can set cron job par hour and update the value here

if(($i-$count)>=100) // update this in code of sendmail.php

unsubscribe.php

<?php
$con = mysql_connect("localhost","dbuser","dbpass");
mysql_select_db("dbname", $con);

$sno = (integer)$_GET['id'];
$email = mysql_real_escape_string($_GET['username']);

$query = "update tablename set sub_status = 'UNSUBSCRIBED' where sno = $sno and email = '$email'";
mysql_query($query);
echo "You have Successfully unsubscribed. Thank you for using the service.";

 

Comment here if you have any queries. 

Find HCF and LCM in C Programming

C program to find HCF (Highest Common Factor) and LCM( Least Common Multiple): Today I will write a program on how to find HCF and LCM of two integers. HCF is also known as Greatest Common Divisor(GCD) or Greatest Common Factor(GCF).

Here there are three methods to find HCF and LCM in C Programming as follow:

  1. Find HCF and LCM using Loop
  2. Find HCF and LCM using Recursion
  3. Find HCF and LCM using Function

Find HCF and LCM in C Programming using Loop

/**
Write a c program to find hcf and lcm using Loop
**/
#include <stdio.h>

int main() {
  int a, b, x, y, t, gcd, lcm;

  printf("Enter two integers\n");
  scanf("%d%d", &x, &y);

  a = x;
  b = y;

  while (b != 0) {
    t = b;
    b = a % b;
    a = t;
  }

  gcd = a;
  lcm = (x*y)/gcd;

  printf("Greatest common divisor of %d and %d = %d\n", x, y, gcd);
  printf("Least common multiple of %d and %d = %d\n", x, y, lcm);

  return 0;
}

Output of C Program:

Enter two integers
9
24

Greatest common divisor of 9 and 24 = 3
Least common multiple of 9 and 24 = 72

 

Find HCF and LCM in C Programming using Recursion

/**
Write a c program to find hcf and lcm using Recursion
**/
#include <stdio.h>

long gcd(long, long);

int main() {
  long x, y, hcf, lcm;

  printf("Enter two integers\n");
  scanf("%ld%ld", &x, &y);

  hcf = gcd(x, y);
  lcm = (x*y)/hcf;

  printf("Greatest common divisor of %ld and %ld = %ld\n", x, y, hcf);
  printf("Least common multiple of %ld and %ld = %ld\n", x, y, lcm);

  return 0;
}

long gcd(long a, long b) {
  if (b == 0) {
    return a;
  }
  else {
    return gcd(b, a % b);
  }
}

Find HCF and LCM in C Programming using Function

/**
Write a c program to find hcf and lcm using Function
**/
#include <stdio.h>

long gcd(long, long);

int main() {
  long x, y, hcf, lcm;

  printf("Enter two integers\n");
  scanf("%ld%ld", &x, &y);

  hcf = gcd(x, y);
  lcm = (x*y)/hcf;

  printf("Greatest common divisor of %ld and %ld = %ld\n", x, y, hcf);
  printf("Least common multiple of %ld and %ld = %ld\n", x, y, lcm);

  return 0;
}

long gcd(long x, long y) {
  if (x == 0) {
    return y;
  }

  while (y != 0) {
    if (x > y) {
      x = x - y;
    }
    else {
      y = y - x;
    }
  }

  return x;
}

Please comment if this code is useful to you or having any queries.

Factorial Program in C Programming

Factorial program in C Programming Language: C Program code to find and print factorial of a number.

Factorial can be achieved by three methods as follow:

  1. Factorial Program using loop,
  2. Program using a function to find factorial and
  3. Factorial Program using recursion.

Factorial is represented using ‘!’, so five factorial will be written as (5!), n factorial as (n!). Also n! = n*(n-1)*(n-2)*(n-3)…3.2.1 and zero factorial is defined as one i.e. 0! = 1.

Factorial program in C Programming using ‘for’ loop

Here we find factorial using ‘for’ loop.

/**
Write a c program to find the factorial of number using for loop
**/
#include <stdio.h>

int main()
{
  int c, n, fact = 1;

  printf("Enter a number to calculate it's factorial\n");
  scanf("%d", &n);

  for (c = 1; c <= n; c++)
    fact = fact * c;

  printf("Factorial of %d = %d\n", n, fact);

  return 0;
}

Output:

Enter a number to calculate it's factorial
6
Factorial of 6 = 720

 

Factorial program in C Programming using function

Here we find factorial using function.

/**
Write a c program to find factorial of number using Funtion
**/
#include <stdio.h>

long factorial(int);

int main()
{
  int number;
  long fact = 1;

  printf("Enter a number to calculate it's factorial\n");
  scanf("%d", &number);

  printf("%d! = %ld\n", number, factorial(number));

  return 0;
}

long factorial(int n)
{
  int c;
  long result = 1;

  for (c = 1; c <= n; c++)
    result = result * c;

  return result;
}

 

Factorial program in C Programming using recursion

Here we find factorial using Recursion.

/**
Write a c program to find a factorial of number using Recursion
**/
#include<stdio.h>

long factorial(int);

int main()
{
  int n;
  long f;

  printf("Enter an integer to find factorial\n");
  scanf("%d", &n); 

  if (n < 0)
    printf("Negative integers are not allowed.\n");
  else
  {
    f = factorial(n);
    printf("%d! = %ld\n", n, f);
  }

  return 0;
}

long factorial(int n)
{
  if (n == 0)
    return 1;
  else
    return(n * factorial(n-1));
}

Recursion is a technique in which a function calls itself, for example in above code factorial function is calling itself. To solve a problem using recursion you must first express its solution in recursive form.

Please comment if this post is useful to you or have any queries.

Add, Subtract, Multiply and Division in C Programming Language

Write a program in C Programming to perform basic arithmetic operation like addition, subtraction, multiplication and division. C Programming Language comes with arithmetic operators. Operator we will use in the C Program are:

  • ‘+’ Addition
  • ‘-‘ Subtraction
  • ‘*’ Multiplication
  • ‘/’ Division

This operation can be performed on Integer, Float or Double Number. These are Data Types.

/**
Write a C program to perform arithmetic Operation on two Numbers
**/
#include <stdio.h>

int main()
{
   int first, second, add, subtract, multiply;
   float divide;

   printf("Enter two integers\n");
   scanf("%d%d", &first, &second);

   add        = first + second;
   subtract = first - second;
   multiply = first * second;
   divide     = first / (float)second;   //typecasting

   printf("Sum = %d\n",add);
   printf("Difference = %d\n",subtract);
   printf("Multiplication = %d\n",multiply);
   printf("Division = %.2f\n",divide);

   return 0;
}

Output:

Enter Two Integers
5 4
Sum = 9
Difference = 1
Multiplication = 20
Division = 1.25

In c language when we divide two integers we get integer result for example 5/2 evaluates to 2. As a general rule integer/integer = integer and float/integer = float or integer/float = float. So we convert denominator to float in our program, you may also write float in numerator. This explicit conversion is known as typecasting.

Check Odd or Even Number using C Programming Language

Today I will show How can we check a number is odd or even in C Programming Language. We also use different method to identify even and odd numbers.

As we all know if we divide any number by 2 and the remainder is 0 (zero), then that number is Even, Otherwise its odd. We will use same logic here in C Programming. In C Programming we can get remainder by % (Modulus) operator.

For example of modulus operator, 3%2 gives 1 as remainder. Even numbers are in form of (2*x) and Odd numbers are in form of ((2*x)+1). Here ‘x’ is integer number.

Program 1: Check whether number is even or odd using modulus operator

#include<stdio.h>

main()
{
   int n;

   printf("Enter an integer\n");
   scanf("%d",&n);

   if ( n%2 == 0 )
      printf("Even\n");
   else
      printf("Odd\n");

   return 0;
}

We can also check the whether the number is even or odd using bitwise operator & (AND).

For example, Binary of 9 is 1001. When we perform 9 & 1, The result will be 1 and you may observe that the least significant bit of every odd number is 1, so ( odd_number & 1 ) will be always one and also ( even_number & 1 ) is zero.

Program 2: Check whether number is even or odd using Bitwise operator 

#include<stdio.h>

main()
{
   int n;

   printf("Enter an integer\n");
   scanf("%d",&n);

   if ( n & 1 == 1 )
      printf("Odd\n");
   else
      printf("Even\n");

   return 0;
}

 

Program 3: Check whether number is even or odd using Conditional Operator (Without using ‘if’ Conditional Operator)

#include<stdio.h>

main()
{
   int n;

   printf("Input an integer\n");
   scanf("%d",&n);

   n%2 == 0 ? printf("Even\n") : printf("Odd\n");

   return 0;
}

In C Programming Language when we divide two integers we get an integer result.

For example the result of 7/3 will be 2. We can take advantage of this and can use it to find whether the number is odd or even. Consider an integer ‘n’ we can first divide by 2 and then multiply it by 2 if the result is the original number then the number is even otherwise the number is odd. For example 11/2 = 5, 5*2 = 10 (which is not equal to eleven), now consider 12/2 = 6 and 6 *2 = 12 ( same as original number). These are some logic which may help you in finding if a number is odd or not.

Program 4: Check whether number is even or odd without using Modulus or Bitwise Operator

#include<stdio.h>

main()
{
   int n;

   printf("Enter an integer\n");
   scanf("%d",&n);

   if ( (n/2)*2 == n )
      printf("Even\n");
   else
      printf("Odd\n");

   return 0;
}

 

Setting Different Template/Design for Post per Category – WordPress

WordPress is providing various ways to set different template on category page but How about if I want to set different template for each category for Single Post Page.

Today I will show how can we achieve this with simple code in single.php

First We need to create single post template for various categories as follow

single_music.php
single_sms.php
single_news.php
single_default.php //For default single post template  for post other than above categories.

Above three files i create because i want to use different single post page template for my music, SMS, and news category respectively. You can create as much file as you can

You can simply create copy of your single.php file and rename it with new template and do the changes that you want for each category single page.

After that open your single.php file remove all code and add following code.

<?php
  $post = $wp_query->post;
  if (in_category('portfolio')) {
      include(TEMPLATEPATH.'/single_music.php');
  } elseif (in_category('news')) {
      include(TEMPLATEPATH.'/single_news.php');
  } elseif(in_category('wordpress')) {
      include(TEMPLATEPATH.'/single_sms.php');
  }
  else{
      include(TEMPLATEPATH.'/single_default.php');
  }
?>

Please comment here if this post is help to you or you have any queries.

 

Find Distance in km and Miles from latitude and longitude value in PHP

I was wondering How can I find distance between two places using latitude and longitude in PHP. Today I will show you How easily we can calculate the distance between to places in Kilometer and Miles. The example here, takes two values for each place ( latitude and longitude ).

Lets create form to accept latitude and longitude value.

<form method="get" action="">

<p>
	<strong>First location</strong> <span style="font-size:0.8em"><em>(default: Ahmedabad, Gujarat, India)</em></span><br>
	Latitude: <input type="text" name="lat1" value="23.0333">
	Longitude: <input type="text" name="lon1" value="72.6167"><br>
	<span style="font-size:0.8em"><em>Expressed in decimal degrees</em></span>
</p>

<p>
	<strong>Second location</strong> <span style="font-size:0.8em"><em>(default: Surat, Gujarat, India)</em></span><br>
	Latitude: <input type="text" name="lat2" value="21.1700">
	Longitude: <input type="text" name="lon2" value="72.8300"><br>
	<span style="font-size:0.8em"><em>Expressed in decimal degrees</em></span>
</p>

<p>
	<input type="submit" value="Calculate">
	<input type="reset" value="Clear Form">
</p>

<hr>
</form>

 

Function to find the distance is as follow:

function findDistance($return_in='km') {
	$Rm = 3961; // mean radius of the earth (miles) at 39 degrees from the equator
	$Rk = 6373; // mean radius of the earth (km) at 39 degrees from the equator

	// get values for lat1, lon1, lat2, and lon2
	$t1 = $_REQUEST['lat1'];
	$n1 = $_REQUEST['lon1'];
	$t2 = $_REQUEST['lat2'];
	$n2 = $_REQUEST['lon2'];

	// convert coordinates to radians
	$lat1 = deg2rad($t1);
	$lon1 = deg2rad($n1);
	$lat2 = deg2rad($t2);
	$lon2 = deg2rad($n2);

	// find the differences between the coordinates
	$dlat = $lat2 - $lat1;
	$dlon = $lon2 - $lon1;

	// here's the heavy lifting
	$a  = (double)pow(sin($dlat/2),2) + cos($lat1) * cos($lat2) * pow(sin($dlon/2),2);
	$c  = (double)2 * atan2(sqrt($a),sqrt(1-$a)); // great circle distance in radians
	$dm = $c * $Rm; // great circle distance in miles
	$dk = $c * $Rk; // great circle distance in km

	// round the results down to the nearest 1/1000
	$mi = round( $dm * 1000) / 1000;
	$km = round( $dk * 1000) / 1000;

	// display the result
	if($return_in=="miles")
		return $mi;
	else
		return $km;
}

This function accept one parameter which is not mandatory. To get the result in mile pass ‘miles’ as parameter. Otherwise it returns result in kilometer.

Comment here if you have any queries.

Live Demo Here

Thanks,

CallServer FormAPI – Teamsite

What is CallServer in FormAPI – Teamsite?

FormAPI is client-side technology. The user scripts that the template designer writes are loaded into the browser and executed by its JavaScript engine. There are many times, however, when code in the user script needs to access resources on a remote server.

Most commonly, the user script needs to run a database query and use the results to set the value of an item. The canonical example is the address entry form that automatically populates the city and state fields after the user has entered the ZIP code. There is no way the user script can include the entire city/state/ZIP database in the code; that information is best obtained from a server.

In Interwoven Teamsite, CallServer is method to make an HTTP request with a set of attributes-value pairs. The request may take the form of either an HTTP POST or an HTTP GET call. The target server (which can be any process that can handle an HTTP request and make a response, such as a servlet or CGI) reads the request and returns JavaScript code embedded in an HTML page. This page is loaded into a hidden frame, distinct from the frame that contains the user script and FormAPI. FormsPublisher provides a special parent.getScriptFrame() function to this hidden frame that returns the user script frame. In this way, the code returned by the server coexists with the user script and has full access to its methods and data.

The callServer() method is asynchronous. A new thread is started with the HTTP request and completes only when it finishes executing the code returned by the server. The user script code that made the request continues executing immediately after the call to callServer(). For this reason, callServer() is usually the last line of code in an event handler; the logic “picks up” in the hidden frame after the post is complete.

Here is an example illustrating a typical city/state/ZIP code form:

IWEventRegistry.addItemHandler("/zip", "onItemChange", fillCityState);

 

The fillCityState() handler is a function that queries a remote server for city and state:

function fillCityState(zipItem) {
	if (zipItem.isValid()) {
		var parameters = new Object();
		parameters.zip = zipItem.getValue();
		// Make an HTTP GET to the server.
		callServer("http://myserver/getCityState", parameters, true);
	}
}

 

The result from a call to the server (which will be given the request like http://myserver/
getCityState?zip=94086) returns code similar to this:

<html>
	<head>
		<script language="javascript">
			// Get handle to the FormAPI/userscript frame.
			api = parent.getScriptFrame();
			// Set the city and state.
			api.IWDatacapture.getItem("/city").setValue("Sunnyvale");
			api.IWDatacapture.getItem("/state").setValue("CA");
		</script>
	</head>
	<body>
	</body>
</html>

 

One of the hazards of making a remote server request is that it may take too long to return. Worse, it may not return at all. To guard against this problem, a user script can use the JavaScript setTimeOut() function to handle a request that does not return within a specified amount of time. Before it calls the server, setTimeOut() is instructed to execute an error handler function. The code that returns from the server cancels the pending error handler call (if it is running, the request succeeded). If the server does not return in time, the error handler is executed.

Adjust the user script fillCityState() function to set up the time out:

...
// Error handler called in 1 minute. Save ID in global variable
// for hidden frame to cancel if it succeeds.
timeout = setTimeOut("callServerFailed", 60000);

// Make an HTTP GET to the server.
callServer("http://myserver/getCityState", parameters, true);
...

 

Create a callServerFailed() function to handle the error case:

function callServerFailed() {
	alert("ZIP code lookup failed. Be sure to enter city and state.");
}

Finally, modify the JavaScript returned from the server to cancel the time out:

...
// Get handle to the FormAPI/userscript frame.
api = parent.getScriptFrame();

// Cancel the pending time out.
clearTimeout(api.timeout);
...

This does not handle the case where the server is not down, but simply slow. In this case, after one minute the user is prompted that the ZIP code lookup failed, but several moments later may suddenly see the city and state fields automatically change. To guard against this possibility, modify the callServerFailed() function to cancel the server call:

function callServerFailed() {
	alert("ZIP code lookup failed. Be sure to enter city and state.");
	// Abort the request by sending a blank page to the hidden frame.
	IWDatacapture.callServer("blank.html", new Object(), true);
}

This request cancels the previous request by making a new one to an empty file. This illustrates an important point about the callServer() method: only one call can be active at a time. Subsequent calls to callServer() will cancel any previous calls.

Important Note:

  1. Use only one CallServer method in Form init for setting initial values in form. To set on init Handler see below code: IWEventRegistry.addFormHandler(“onFormInit”, init);
  2. If on any event you want to set data to more than one element, do not use two call server. Use only one CallServer Method to set all the dropdown.
  3. Above shown is the first way to set the data to elements. Another way to set elements is to set data in array variable and print it on the page in script tag. See below code in perl.
    my $str = "Data1[0] = 'ABC'; Data1[1] = 'XYZ'; Data2[0] = '123'; Data2[1] = 'Test';"; 
    #you can call any subroutine here and return a string like this which sets more values
    
    my $data = qq{
    Content-type: text/html; charset=utf-8
    <script language="javascript">
    	var Data1 = new Array();
    	var Data2 = new Array();
    	var Data3 = new Array();
    	$str
    	var api = parent.getScriptFrame();
    	api.callBackFunction(Data1, Data1, Data1);
    </script>
    <html>
    
    </html>
    };
    
    print $data;

Please comment here if you have any queries or suggestion. I will be posting on generalization of CallServer Method for all the template.

Inline Callout in Autonomy Interwoven Teamsite

<inline>: Provides a method for making server-side inline callout programs that return multiple XML elements to the data capture form. It is like include method in any other anguage.

Syntax of  inline callout in Teamsite:

<inline command="command name" />

Example of inline callout in Teamsite:

<select>
<inline command="command name" />
</select>

The inline callout program should return a well-formed XML document. The document’s outermost element should be a <substitution> element. It should contain any XML that is valid according to datacapture.dtd. That <substitution> element will contain six <option> elements as follow

<?xml version="1.0" encoding="UTF-8"?>
<substitution>
	<option value="Lead" label="Lead"/>
	<option value="Tin" label="Tin"/>
	<option value="Silicon" label="Silicon"/>
	<option value="Plastic" label="Plastic"/>
	<option value="Paper" label="Paper"/>
	<option value="Glass" label="Glass"/>
</substitution>

This simple callout outputs a static result. A more sophisticated callout program could query a database and return the query results as <option> elements. When a server-side inline callout program is executed, it inherits the following  environment variables:„

  • IW_DCT: The server-inclusive vpath to the datacapture.cfg in use (for example, //servername/default/main/development/WORKAREA/username/templatedata/press/events/datacapture.cfg).
  • „IW_ROLE: The role of the current data capture user (for example, editor).
  • IW_USER: The domain and full user name of the current templating user (for example, domain\username).
  • „ IW_WORKAREA: The vpath to the current workarea (for example, //servername/default/main/development/WORKAREA/username).

The exit status from a server-side inline callout should be 0 to indicate a successful execution. Normally an inline callout should not return a non-zero value. However, an example where a non-zero value may be needed to indicate an error condition is if you are populating a <select> menu by making a database query and the database is offline. Rather than displaying a form with no choices, you may prefer an exception be displayed.

Calling Perl file Using inline command:

<inline command="<path-to-iwperl Command> <path/to/perl/filename.ipl parameter1 parameter2" />

Here first we need to pass the commnad that execute the perl file code and second is the path to the perl file to be executed. Perl file should return well-formed XML as per above example. Perl file can return any number of example.

Getting passed parameter value in perl variable:

You can set first parameter value to perl variable as follow

my $var1 = $ARGV[0];

Second Parameter as

my $var2 = $ARGV[1];

Like this you can get any number of parameter passed using $ARGV.

You can get IW Home, IW Mount, Current Workarea path and DCT Path as follow:

my $iwhome = TeamSite::Config::iwgethome();
my $iwmount = TeamSite::Config::iwgetmount();
my $wapath = $ENV{IW_WORKAREA};
my $dct = $ENV{IW_DCT};

You can extract Server, Store, Branch, Workarea name, Category and Datatype in one line code as follow:

($iwserver, $store, $branch, $waname, $category, $datatype) = $dct =~ m#^\/\/([^/]+)\/([^/]+)\/(.*)\/WORKAREA\/([^/]+)\/templatedata\/([^/]+)\/([^/]+).*$#;

Please comment if this information is useful to you or any you have any queries.

Whatsapp Alternatives (Other Options)

Few months before, I bought a new android mobile and started using many apps for free. It is really great experience using android mobile. Whatsapp is really nice app to chat with friends using data line, it supports sharing photos, videos and audio. It have some nice features to broadcast messages, group chat etc.

Some of the available alternates for Whatsapp are as follow. Use which ever you like, Invite your friends and Enjoy free chatting and sharing.

eBuddy XMS:

eBuddy Messenger is even the very popular Social Media Chat application and this eBuddy XMS not only just a chat application but you can even share Photos, video and emoticon. The XMS allows you to stay connected with friends, family and other who are in your contact list.

Download it from Google Play.

ChatPlus:

ChatPlus is an  Android chatting service which allows you to chat with your friends easier and more enjoyably in various way. By fast and correct push notification, you can exchange not only text messages but also photos,videos and voice, locations and handwrites without having to pay for that. And also ChatPlus supports a language translation and posting to Twitter and Facebook. In addition, ChatPlus provides a group chat and mass broadcast.

Download ChatPlus for Android.

GroupMe:

GroupMe allows you to manage Groups and add your contacts from Social Media too.  In Group me you can send and receive messages using your data connection and in case if you have a poor connection, the app can switch you to SMS so you’ll never miss a message. The Location System in GroupMe is unique and it will show you all member’s who resides on Group on Map, Great !

Download GroupMe for Android:

ChatOn:

ChatOn App from Samsung is giving a strong competition to WhatsApp because of it’s Manufacturer and obviously cause of it’s features too. You can chat to your Buddies via personal chat or group chat and can easily share the Pictures, Videos and other Multimedia Formats. You can view all share of multimedia content on ChatOn through one simple option called Trunk.

Download ChatOn for Android:

Viber:

Viber is an application for that lets you make free phone calls to anyone that also has the application installed. When you use Viber, calls and text messages to any other Viber user are free, and the sound quality is much better than a regular call. You can call or text any Viber user, anywhere in the world, for free. All Viber Features are 100% FREE and do not require any additional “in application” purchase.

Download Viber for Android:

Kik Messenger:

Kik Messenger lets you make free messages like Whatsapp. Kik Messenger is not using phone number as identity user has its own identity on Kik messenger. It is fast, better graphics and organization of conversations and contacts, Finds contacts from your existing contact list (just like whatsapp) and completely free.

Download Kik Messenger for Android:

hike:

hike is a new messenger that lets you send free messages to your friends and family! With hike you can message friends that are on hike and also those who aren’t on hike too! You’ll never have to use another messaging app again. Better yet, it’s absolutely free!  It also support photos, Video and Audio sharing. It supports group messages.

Download hike for Android:

So here ends our list of WhatsApp alternatives (Other Options) for Android, if you liked this list, please share it on your social network profiles, If you would like to suggest any app our readers or would like to improve this list, please do let us know in comments section below.