skip to Main Content

Receive email from users in my gmail account when user submit the contact form in laravel in live server – CPanel

I am using laravel 7. I want to receive email from user in my gmail account when user submit the contact form in live server. My .env MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=mygmail MAIL_PASSWORD=mypassword MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=null MAIL_FROM_NAME="${APP_NAME}" My controller public function saveContact(Request…

VIEW QUESTION

Can't send server emails in CodeIgniter 4 – CPanel

I just hanged up to send server emails. I'm preparing email sending code like this: $email_config = Array( 'charset' => 'utf-8', 'mailType' => 'html' ); $email = ConfigServices::email(); $email->initialize($email_config); $email->setNewline("rn"); $email->setCRLF("rn"); $email->setFrom("[email protected]", "Sender name"); $email->setTo("[email protected]"); $email->setSubject("Test message"); $email->setMessage("Hello"); if ($email->send())…

VIEW QUESTION

PHP Fatal error: Uncaught Swift_TransportException: Connection could not be established with host ssl://smtp.gmail.com :stream_socket_client() – Php versions

I'm using Windows 10 with cmd. When I'm starting my index.php file, using php index.php I'm getting this error: PHP Fatal error: Uncaught Swift_TransportException: Connection could not be established with host ssl://smtp.gmail.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL…

VIEW QUESTION
Back To Top
Search