Send emails using PHP

In PHP there is a function called “mail” for send emails from our web applications. To use this this function, we have to do some configurations in php.ini file of our web server. If you are using PHP-equipped web host, you don’t need to worry about this mail function setup configuration because all required configurations are done by the hosting providers.


Setting up mail function in PHP


step 1> Goto “php.ini” file in your web server.

step 2> Find “[mail function]” part in the php.ini file.

step 3 for window mail server> Give the mail servers address to “SMTP”, give the port of the SMTP to “smtp_port” (default is 25) and set “sendmail_from” to sender’s email address.


[mail function]


smtp_port = 25

sendmail_from = you@yourdomain

step 3 for unix mail server> Give the path of the mail program on your server and set “sendmail_from” to sender’s email address.


[mail function]

sendmail_path = /usr/sbin/sendmail -t

sendmail_from = you@yourdomain


PHP mail function sample code



// The message

$message = “Line 1\nLine 2\nLine 3”;

// In case any of our lines are larger than 70 characters, we should use wordwrap()

$message = wordwrap($message, 70);

// Send

mail(‘,‘, ‘The Subject’, $message);


refer :


How to recover hidden data in your pen driver

  1. go to the cmd (press Window key + R -> type “cmd” -> press Enter)
  2. go to your pen drive by type “:” (eg: C:\>f:)
  3. take a view of all hidden file in your pen by typing “dir /ah” (eg f:\>dir /ah)
  4. type “attrib [name of file/folder] -r -a -s -h”
  5. type “attrib -r -a -s -h” to unhide the file (attrib test.txt -r -a -s -h)
  6. if the file name is longer than 6 charactors, the type like this, “attrib filena~1 -r -a -s -h” (filename.txt is the file name)
  • Use this command “attrib -s -h -r f:\*.* /s /d” to solve your problem in once for all file and folders (f: is the pen diver)
%d bloggers like this: