Send Email Using Gmail SMTP Server From PHP Script

Опубликовано: 02 Сентябрь 2017
на канале: Artisans Web
4,100
10

If we have a website then we obviously need to send emails to users. That email should go through your contact us page, through your newsletter, on user registration etc.

PHP provides a mail() function which used to send an email. But there are limitations while using mail() method. You can’t send email from a local development server. Another drawback is, there is a high possibility of your email ended up in a Spam folder.

To get out of these problems, we need to use SMTP server to send emails.

In this video, we study how to use PHPMailer and Gmail SMTP server for sending emails.

We first need to install PHPMailer library in our project. The recommended way to install library is through Composer.

Open the command prompt in your project root directory and run the below command.

composer require phpmailer/phpmailer

http://artisansweb.net/send-email-usi...

~-~~-~~~-~~-~
Please watch: "How To Add Two Step Authentication On WordPress Website"
   • How To Add Two Step Authentication On...  
~-~~-~~~-~~-~


Смотрите видео Send Email Using Gmail SMTP Server From PHP Script онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Artisans Web 02 Сентябрь 2017, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,100 раз и оно понравилось 10 людям.