• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email Not Received Outside of Website Domain

#1
Hi Everyone,

A website which is in production and on the host's server is able to send and receive emails within its own domain via CI's Email Library, however, the email is not received outside the website's domain. I have tried all sort of configurations, 'mail', 'sendmail', 'smtp'.

The 'To' email address, which is the same as the 'smtp_user' in the Email config, (actual domain redacted), is receiving the emails, which indicates to me that the SMTP is set up correctly.  However the email address the user enters in the site's email form is not receiving the same email; either as an addition in the 'To' list, or as a 'Cc'.

The server host have said that the email application, (CI's Email library), is not authenticating itself, so is being rejected by the likes of Yahoo, Telstra Bigpond etc.

I would have though that the email config I have set up, and is being used would be the authentication:
PHP Code:
$config['protocol'] = 'smtp';
$config['mailtype'] = 'html';
$config['crlf'] = '\r\n';
$config['newline'] = '\r\n';
$config['smtp_host'] = 'domain-name.com.au';
$config['smtp_user'] = 'info@domian-name.com.au';
$config['smtp_pass'] = 'pw';
$config['smtp_port'] = '465';
$config['smtp_timeout'] = '20';
$config['smtp_crypto'] = 'ssl';
$config['charset'] = 'utf-8'

Our phones / tablets have been set up with the mail settings, and emails can be received by Yahoo etc.  I do notice in the headers of these emails at Yahoo contain the Sender Policy Framework, and DomainKeys Identified Mail data.  Do the SPF and DKIM need to be added in CI's email config?


Thanks for your help in advance,
Ian.
Reply

#2
PHP Code:
        $this->load->library('email');
        $config['protocol']    'smtp';
        $config['smtp_host']    'domain here';
        $config['smtp_port']    '25'// try also yours
        $config['smtp_timeout'] = '7';
        $config['smtp_user']    'email';
        $config['smtp_pass']    'email pass';
        $config['charset']    'utf-8';
        $config['newline']    "\r\n";
        $config['mailtype'] = 'html';
        $config['validation'] = FALSE;
        $this->email->initialize($config);
        $this->email->from('donotreply@email.bla''title here');
        $this->email->to('to email');
        $this->email->subject('test email');
        $this->email->message('
        <h2>hallo world</h2>
        '
);
        $this->email->send(); 
i use this one without ssl and its working fine...  for CI3
Reply

#3
Did you check your server and other log files to see if there is an error?

If it is a crypto problem you can read this, but I would not edit the system file.

Email not send via SSL (in log: Failed to enable crypto)
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#4
Hi Guys,

I have tried with and without SSL, and the ports recommended by the host.  Still nothing received outside the server.

@InsiteFX:
I extended the email library class with the code changes in the link provided; same result, nothing received at yahoo.

The CI logs have yielded nothing that is helpful. With a logging threshold of 4, only info / debug entries, no error entries to shed some light.

From what I can see of the server logs, there appears to be nothing of value there either, no errors that I can see.  I will remove the logs and have a better look with a clean slate when I have more time.


Thanks for help thus far,
Ian.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.