Skip to main content

Posts

Showing posts from December 17, 2017

How to Check the Ubuntu Version

How to Check the Ubuntu Version.         Command used : more /etc/issue      This will return something like this:      Output  : Ubuntu 14.04.5 LTS \n \l

Send Email via SMTP server using PHPMailer

Email sending is the most useful feature for web application. mail() function in PHP is used to send mail from PHP script.While sending email using mail() ,the mail will be sent from web server. Sometimes it may cause issues on sending an email and fails to deliver. With SMTP you can overcome this issue,when you send an email through SMTP server email will be sent through mail server  rather than web server.       The easiest way to send email in PHP with SMTP is to use PHPMailer library. PHPMailer provides an ability to send email via SMTP server in PHP. In this tutorial, you’ll show how you can send HTML email with SMTP in PHP using PHPMailer. Send Email via SMTP server: PHPMailer library: The script uses PHPMailer to send the email via SMTP server, so PHPMailer library needs to be included first. Include the PHPMailerAutoload.php file and create a new PHPMailer instance. <?php require ( "phpmailer/PHPMailerAutoload.php" ); $mail = new ...