Sending email to gmail (Codeigniter), appears as spammer

Asked

Viewed 243 times

0

I have a problem sending emails to Gmail through Codeigniter. Every email I send doesn’t show up the images and gets a Gmail message saying it might be a spammer. Is there any way to get over it?

Follow a print of how I see the email in gmail:

inserir a descrição da imagem aqui

Something like this should appear (the following image is how it appears in the webmail):

inserir a descrição da imagem aqui

Code used:

$this->load->model('template_model');
            $mensagem = $this->template_model->addUtilizador($assunto, $msg);

            $config = array(
                'protocol'  => 'smtp',
                'smtp_host' => 'ssl://*********',
                'smtp_user' => '*****@*****.com',
                'smtp_pass' => '********',
                'smtp_port' => 465,
                'validate'  => TRUE,
                'charset'   => 'utf-8',
                'mailtype'  => 'html',
                'useragent' => 'Centro de Eventos',
                'wordwrap'  => true,
                'priority' => 1
            );

            $this->load->library('email', $config);

            $this->email->set_mailtype("html");
            $this->email->from('[email protected]', 'Centro de Eventos FEUP');
            $this->email->to($destinatarios);
            $this->email->subject($assunto);
            $this->email->message($mensagem);
            $this->email->send()
  • Post the code !

  • I am currently with this same problem. I haven’t been able to find any solution for now. What happens is that a sending smtp with a different sender than the forwarding server is a characteristic behavior of spam. I do not know if it has solution.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.