Welcome Guest, Not a member yet? Register   Sign In
Problems with Google SMTP and sending emails as HTML
#1

[eluser]netenabled[/eluser]
Hi guys,

I am hoping you can help I have now spent 5 days pulling my hair out on this.

I am trying to send a Html email but am having all sorts of issues.

My last and current issue is that, the email sends okay! and is received okay!

However everytime the html comes out as html in the body of the email.

I am sending hopefully via the Google mail SMTP however I am wondering if this is maybe the problem? as in my email header it actually references my server?

Could anyone please help out. My code is below. The code for the email is just a simple html, body with test in the middle.

Code:
$config = Array(
     'protocol' => 'smtp',
     'smtp_host' => 'ssl://smtp.googlemail.com',
     'smtp_port' => 465,
     'smtp_user' => 'xxxx@xxxxxxx',
     'smtp_pass' => 'xxxxxxx',
     'mailtype'  => 'html',
     'charset'   => 'iso-8859-1'
        );
        
        $this->load->library('email', $config);

        $this->email->set_newline("\r\n");
        $this->email->from('xxxx@xxxxxxx');
    
        $this->email->to("xxxx@xxxxxx");
    
        $this->email->subject('Test Email');
    
        $body = $this->load->view('emails/order',null,TRUE);
        $data["summary"] = $config;
        
    
        $this->email->message( $this->load->view( 'emails/order', $data, true ) );
    
        if (!$this->email->send()){
      
     echo 'failed to load email';
        }
        else {
      
     echo 'success sent email';
        }


Messages In This Thread
Problems with Google SMTP and sending emails as HTML - by El Forum - 06-27-2013, 12:18 AM
Problems with Google SMTP and sending emails as HTML - by El Forum - 06-28-2013, 12:32 PM
Problems with Google SMTP and sending emails as HTML - by El Forum - 06-28-2013, 04:29 PM
Problems with Google SMTP and sending emails as HTML - by El Forum - 06-30-2013, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB