Welcome Guest, Not a member yet? Register   Sign In
Sending email using smtp doesn't work
#2

I have also tried sendgrid without success:
PHP Code:
$config['protocol']         'smtp';
        $config['smtpHost']        'smtp.sendgrid.net';
        $config['smtpPort']        587;
        $config['smtpUser']        'apikey';
        $config['smtpPass']        'my_key';
        $config['charset']          'utf-8';
        $config['mailType']         'html';
        $config['SMTPCrypto'] = 'tls'// tls or ssl

       

        $email 
= \Config\Services::email();
        $email->initialize($config); // Use the config above

        $email->setFrom('[email protected]''xxx');
        $email->setTo('[email protected]');
        $email->setSubject('Email Test');
        $email->setMessage('Testing the email class.');
        $email->send(); 
Reply


Messages In This Thread
RE: Sending email using smtp doesn't work - by muuucho - 04-14-2020, 04:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB