this is php script to send email phpmailer library with smtp
- create gmail account
- open the account
- goto settings or manage account
- click on security tab
- enable 2-step verification
- under 2-step verification, click on App pasword
- enter the gmail account passowrd to verify and contiue
- select app and choose other (custom app)
- type "Test" in the testbox and click on generate
- lastly, copy the password generated and paste it in $mail->Password = '',