PHP : How to use phpmailer to send email with smtp

phpmailer with smtp for php

Now as per email authentication some server does not allow to send email without smtp. This  is used to reduce bulk email and spamming.  In PHP phpmailer is widely use to send email with SMTP.  I am trying to explain in simple way.

Step -1 : Download phpmailer from

Step- 2 : Use given below SMTP script



require '../PHPMailerAutoload.php';

//Create a new PHPMailer instance
$mail = new PHPMailer;
//Tell PHPMailer to use SMTP

//Enable SMTP debugging
//$mail->SMTPDebug = 2;

//Ask for HTML-friendly debug output
$mail->Debugoutput = 'html';
//Set the hostname of the mail server
$mail->Host = "";
//Set the SMTP port number - likely to be 25, 465 or 587
$mail->Port = 25;
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//Username to use for SMTP authentication
$mail->Username = "";
//Password to use for SMTP authentication
$mail->Password = "yourpassword";
//Set who the message is to be sent from
$mail->setFrom('', 'First Last');
//Set an alternative reply-to address
$mail->addReplyTo('', 'First Last');
//Set who the message is to be sent to
$mail->addAddress('', 'John Doe');
//Set the subject line
$mail->Subject = 'PHPMailer SMTP test';
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
//Replace the plain text body with one created manually
$mail->AltBody = 'This is a plain-text message body';
//Attach an image file

//send the message, check for errors
if (!$mail->send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
} else {
    echo "Message sent!";

Note :

You may have to  change smtp user , password and host name as per your server configuration.

Perhaps SMTP port may not need to change from 25. Because in most of cased it will be same. However you also check port number.

If you use cpanle, then you can find these detail from “CONFIGURE  MAIL CLIENT” link under email account list page.

I hope this will help you to send email. You can also try ssl option. For that you may need to change port number.


Xiaomi Redmi Note 3 In India – Pros and Cons and price

Xiaomi Redmi Note 3
Xiaomi Redmi Note 3


PRICE FOR INDIA : Rs. 9999 to Rs. 12000

Xiaomi launched redmi Note 3 smartphones in India, a variant of the handset to introduce in the country based on Qualcomm. This is the first international launch of the note Xiaomi redmi 3, which was launched in November last year in China carry a MediaTek Soc showcased.

The new variant of the Xiaomi Note 3 redmi Snapdragon 650 SoC Qualcomm and runs Xiaomi it claims the first smartphone in the country, this is to do. It will be available in dark gray, champagne gold and silver colors, and Xiaomi said the smartphone its third “is Making India supply in the country.

best look
including a 2 GB RAM and 16 GB built-in memory and other 3GB of RAM and 32GB of built-in memory – The redmi 3 notes are in two versions of RAM and storage available. The 2GB variant is priced at Rs. 9999, while the 3 GB variant is priced at Rs. 11999th It is from Wednesday to and available. It will go on sale on Flipkart and Snapdeal at a later date.


  • Great looks and build quality
  • Vivid display
  • Strong CPU performance
  • Very good battery life
  • Offers good value



  • Expandable storage limited to 32GB
  • Camera could have been better

You can buy at   :


Photoshop Tips for beginners – How to Design Feathered Edges in Photoshop

This tutorial explains how to create soft edges in an image in Photoshop so that it blends into the background 

1. Copy the original picture:
Copy the image so is still the original, and the copy job.

2. Consider the final size:
Before leaving crop the image enough background so you can feather the edges.

3. Touch the picture:
Erase areas in the background that distract from the quality of the image with the rubber seal or retouching tool. Adjust the contrast and brightness, if necessary.

4. Select the area you want pen:

Use one of the selection tools to highlight the area you want feathers. The picture on the left shows the rectangular marquee tool being selected. Use this tool to square or rectangular boundaries, or the oval tool framework for rounded edges or the Lasso tool to images of strange shapes (the Lasso tool is just below the marquee tool).

5. Make a even border :

To highlight its border evenly on all sides become the rule and measure the same number in the directory of numbers in both width and height. The right image is set to inches and the border is set to 3/10 of an inch at each corner. Its border can be more or less.

6: Choose background color:

You will be copying the image and pasting it onto another background but first you need to set the background color of the new image. The background color needs to be the same as the color of the page you are going to paste it on, i.e., you need to chose a black background for a black page.

7. Choose the background color:
You will copy the image and paste it into another fund, but first you need to set the background color of the new image. The background color should be the same as the color of the page to be pasted into, that is, you have to choose a black background for a black page.

Click the bottom tool and choose the preferred color by clicking a color in the palette, or if you prefer to use a color that is not listed in the Color Pallet can enter another hexadecimal code for the color. If you want to match the bottom of the page use the dropper to get the hex color of the background and type in that number.

8. Pen image:

Now, back to the highlighted image and choose “select / feather” from the menu and then choose a range of 4-12 pixels to determine the width of the feathered edge. You can not see a change, but only proceeding to the next step.

9. Copy and paste image

Now choose “Edit / Copy” and “new.” Photoshop automatically opens a new box size image that you copied. Be sure to specify the background color. Now choose “Edit / Paste” and the image of pen should appear in the box that just opened.

10. Save the new image
Select “edit / save” and is now on unless you want to “edit / copy / paste” the feathered image into another image. The finished image as it appears on a black background appears below:


Photoshop Tips for beginners – Combine images with text

Photoshop is an easy to use and very difficult to master, but help is at hand with our complete list of tips, tricks and software solutions for the showpiece of the player. Whether you are looking for tips on using layers, the advice in the domain of the Pen tool, a guide to the use of RAW, or ways to improve his brushwork. Most of these tips were originally published in the magazine Practical Photoshop


There is a very easy to superimpose one image on top of the text way. Drop an image layer on a text layer and then hold down the Alt key and click the line between the two layers in the Layers panel to crop the image to text.

Sketch With Material Design

If you are designer then this article is for you. I did not write this article. Actually i got this useful article from

So i will give credit to smashingmagazine for this article.


The tools are an extension of our hands, and as such, must be versatile, fast and intuitive. Much has changed between the era of offset printing presses and the digital era of multiplatform screens.

Developers have tried to adapt our tools, but Sketch is perhaps the most successful application in this regard its creators have taken the swelling began again and has a smaller feature set fit for purpose. What may seem on the surface to be a simple drawing tool nails done in the basic workflows of digital design. The latest version of Sketch (3.2) came with something special for those interested in the ultimate visual design language Google: the sheet material design labels. In this tutorial, we will design a test application with the help of Sketch and label sheet material design.

If you want to know more about this then please visit at

Codeigniter 3 new realease – PHP framework

There is no doubt that CodeIgniter is a powerful PHP framework. It comes with a small footprint, however it built for developers who need a powerful toolkit to create full-featured web applications. Codeigniter is a very easy to understand for php framerwork learner.

CODEIGNITER 3 VERSION RELEASEEllisLab planned to release CodeIgniter 3 under the Open Software License 3 (OSL3).
General Changes in new Codeigniter 3 will be :

  • PHP 5.1.6 is no longer supported. CodeIgniter now requires PHP 5.2.4 and recommends PHP 5.4+ or newer to be used.
  • Changed filenaming convention (class file names now must be Ucfirst and everything else in lowercase).
  • Changed the default database driver to ‘mysqli’ (the old ‘mysql’ driver is DEPRECATED).
  • $_SERVER['CI_ENV'] can now be set to control the ENVIRONMENT constant.
  • Added an optional backtrace to php-error template.
  • Added Android to the list of user agents.
  • Added Windows 7, Windows 8, Windows 8.1, Android, Blackberry, iOS and PlayStation 3 to the list of user platforms.
  • Added Fennec (Firefox for mobile) to the list of mobile user agents.
  • Ability to log certain error types, not all under a threshold.
  • Added support for pem, p10, p12, p7a, p7c, p7m, p7r, p7s, crt, crl, der, kdb, rsa, cer, sst, csr Certs to mimes.php.
  • Added support for pgp, gpg, zsh and cdr files to mimes.php.
  • Added support for 3gp, 3g2, mp4, wmv, f4v, vlc Video files to mimes.php.
  • Added support for m4a, aac, m4u, xspf, au, ac3, flac, ogg, wma Audio files to mimes.php.
  • Added support for kmz and kml (Google Earth) files to mimes.php.
  • Added support for ics Calendar files to mimes.php.
  • Added support for rar, jar and 7zip archives to mimes.php.
  • Updated support for xml (‘application/xml’) and xsl (‘application/xml’, ‘text/xsl’) files in mimes.php.
  • Updated support for doc files in mimes.php.
  • Updated support for docx files in mimes.php.
  • Updated support for php files in mimes.php.
  • Updated support for zip files in mimes.php.
  • Updated support for csv files in mimes.php.
  • Added Romanian, Greek, Vietnamese and Cyrilic characters in application/config/foreign_characters.php.
  • Changed logger to only chmod when file is first created.
  • Removed previously deprecated SHA1 Library.
  • Removed previously deprecated use of $autoload['core'] in application/config/autoload.php. Only entries in $autoload['libraries'] are auto-loaded now.
  • Removed previously deprecated EXT constant.
  • Updated all classes to be written in PHP 5 style, with visibility declarations and no var usage for properties.
  • Added an Exception handler.
  • Moved error templates to application/views/errors/ and made the path configurable via $config['error_views_path'].
  • Added support non-HTML error templates for CLI applications.
  • Moved the Log class to application/core/
  • Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per environment.
  • Changed detection of $view_folder so that if it’s not found in the current path, it will now also be searched for under the application folder.
  • Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths.
  • Updated email validation methods to use filter_var() instead of PCRE.
  • Changed environment defaults to report all errors in development and only fatal ones in testing, production but only display them in development.
  • Updated ip_address database field lengths from 16 to 45 for supporting IPv6 address on Trackback Library and Captcha Helper.
  • Removed cheatsheets and quick_reference PDFs from the documentation.
  • Added availability checks where usage of dangerous functions like eval() and exec() is required.
  • Added support for changing the file extension of log files using $config['log_file_extension'].
  • Added support for turning newline standardization on/off via $config['standardize_newlines'] and set it to FALSE by default.
  • Added configuration setting $config['composer_autoload'] to enable loading of a Composer auto-loader.
  • Removed the automatic conversion of ‘programmatic characters’ to HTML entities from the URI Library.
  • Changed log messages that say a class or file was loaded to “info” level instead of “debug”, so that they don’t pollute log files when $config['log_threshold'] is set to 2 (debug).

For more detail please visit at

Xiaomi Mi3 – True Review

I am working as a Website developer. I had need to purchase a good mobile with higher screen resolution. I dont want to spend more money. So lucky i could get MI3.

This mobile is excellent in performance….

xiaomi mi3

Release date September 2013
Form factor Touchscreen
Dimensions (mm) 144.00 x 72.00 x 8.10
Weight (g) 145.00
Battery capacity (mAh) 3050
Removable battery No
Colours Metallic Grey
SAR value NA
Screen size (inches) 5.00
Touchscreen Yes
Touchscreen type Capacitive
Resolution 1080×1920 pixels
Pixels per inch (PPI) 441
Colours 16M
Processor 2.3GHz  quad-core
Processor make Qualcomm Snapdragon 800 8274AB
Internal storage 16GB
Rear camera 13-megapixel
Flash Yes
Front camera 2-megapixel
Operating System Android 4.4
Skin MIUI version 5
Java support Yes
Browser supports Flash Yes
Wi-Fi Yes
Wi-Fi standards supported 802.11 a/ b/ g/ n/ ac
Bluetooth Yes, v 4.00
Infrared No
Wi-Fi Direct Yes
MHL Out No
Headphones 3.5mm
FM Yes
Charging via Micro-USB Yes
Proprietary charging connector No
Proprietary data connector No
Number of SIMs 1
SIM Type Regular
3G Yes
Compass/ Magnetometer Yes
Proximity sensor Yes
Accelerometer Yes
Ambient light sensor Yes
Gyroscope Yes
Barometer Yes
Temperature sensor No

Do we need screen protector for xiaomi mi3 screen ?

Now the company, also referred to as ‘China’s Apple’, has clarified on Twitter that the Mi 3 sold in India comes with scratch resistant Corning Gorilla Glass 3 protection. The Mi India’s official Twitter handle said, “Did you know? All Mi 3 phones sold in India come with scratch resistant Corning Gorilla Glass 3!”. So we dont need to worry about screen. It is not required screen quard.

Still any doubt ?  Just read more review from

xiaomi-mi3-pic-2 Corning-Gorilla-Glass-31




New Apple’s iWatch


Before the iPhone 6 came dummies in focus, it was a SmartWatch that when someone mentions Apple jumped to mind. Because Apple WWDC came and went without an iPhone, iPad or iWatch, the rumor mill is now moving his predictions for October.

According to an Apple supplier and sources close to the matter Apple in October (perhaps next to an iPhone or iPhone) to solve its SmartWatch and intends to 3-5 million units per month. Sources speculate that the iWatch could be a curved OLED display and sensors to collect data such as blood sugar, calories burned, sleep activity and oxygen content in the blood sport. The SmartWatch could collect biometric data with your iPhone Touch ID as well.

The iWatch is expected that a modified version of iOS running 8 and we think it will have Apple’s new HealthKit bunch of fitness-tracking apps in tow.

Super Kapil Sharma – Bollywood anker

Kapil Sharma is an Indian stand-up comedian, anchor, singer and actor.  He was selected among top 100 celebrities in 2013 Forbes India magazines and he was ranked 96th in that list. Well now he is hosting INDIAN COMEDY SHOW “COMEDY NIGHTS WITH KAPIL”, which now most famouse.


kapil sharma with shahrukha khan kapil sharma with amitabha bachhan kapil sharma wallpaper Kapil-Sharma-new



Neuroscientists toward understanding how the brain works – Brain Mapping

Neuroscientists toward understanding how the brain works has made great strides in recent years . U.S. initiative brain will try to create a comprehensive picture of brain activity while in the coming years , Europe’s Human Brain Project , a computational simulation of the human brain will try to make . These ambitious projects would greatly benefit from a new resource : detailed and comprehensive map of the brain ‘s structure and its various regions . As part of the Human Brain Project , German and Canadian scientists led an international team of researchers in the last 50 times the resolution of such a map is a three- dimensional atlas of the brain were produced . Which took a decade to complete atlas , slicing a brain in thousands of thin sections and digitally stitch them back together with the help of supercomputers is required .

As small as 20 micrometers, about the size of several human cells is able to show the details , the brain anatomy.To three-dimensional digital reconstruction of the brain is a major step forward in understanding the guide , Jülich Research Center Katrin Amunts researchers led by a 65- year-old woman in Germany at the start of an MRI machine used for post-mortem brain image . The brain was then cut into ultrathin slices . Scientists stained sections one by one on a flatbed scanner and then imaged. Alan Evans and his colleagues at the Montreal Neurological Institute, a terabyte in size , resulting in about 7,404 images organized in a data set . Evans had to overcome these defects in images so that slicing , bent, torn , and the tissue was torn. They also combine in the brain, each one in its original condition . The result is mesmerizing : the arrangement of cells and tissues to check you out or zooming, a brain model that can swim through .

In the early 20th century , Korbinian Brodmann , a German neuroanatomist sections of the brain under a microscope, looking at the structure and organization of the human cortex into 50 different areas parceled. ” That’s what we ‘ve used that for 100 years has been very much the model structure , ” says Evans . As they map the boundaries between brain areas Brodmann now he and his colleagues are redoing work . Results for the study of various brain functions , providing scientists with a more accurate road map , more like 100 to 200 may show different areas . Amunts nerve fibers in the brain tissue to reconstruct the three-dimensional structure that uses polarized light which is developing a technology . And Karl Deisseroth, a bioengineer at Stanford University , a neuroscientist and developed in the laboratory technique called clarity , scientists directly intact neurons in brain circuitry and allows for viewing of the structures . Because the fat cells in your brain to block light , like any other tissue , is usually opaque . Clarity leaves intact and visible to other structures, replacing them with a gel-like substance , lipid melts away . Clarity can be used on a whole mouse brain , human brain technology completely intact with the current version is too large to be studied . But Deisseroth technology already is easier and less error prone 3d reconstruction , a thin brain, human brain tissue section thousands of times larger than can be used to block calls .