Canot send mail with mailgun smtp using codeigniter
<p>I'm trying to send an email using codeigniter email library and mailgun smtp.
The smtp settings are configured corectly and i don't know what could be the problem....</p>

<p>here is the php code:</p>

<pre><code>$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.mailgun.org';
$config['smtp_port'] = 25;
$config['smtp_user'] = 'user@user.com';
$config['smtp_pass'] = 'thepasswordconfiguredinmailgun';
$config['smtp_timeout'] = '4';
$config['crlf'] = '\n';
$config['newline'] = '\r\n';

$this-&gt;email-&gt;initialize($config);
$this-&gt;email-&gt;clear(TRUE);
$this-&gt;email-&gt;from('office@test.com', 'FromName');
$this-&gt;email-&gt;to('myemail@yahoo.com');

$this-&gt;email-&gt;subject('Subiect de test');
$this-&gt;email-&gt;message('Testez sa vad daca merge si daca pot sa trimit. Daca nu pot de ce nu pot ?');

$this-&gt;email-&gt;send();
echo $this-&gt;email-&gt;print_debugger();
</code></pre>

<p>I've got the following errors:</p>

<pre><code>The following SMTP error was encountered: 110 Connection timed out
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:

from: 

The following SMTP error was encountered:
Unable to send data: RCPT TO:

to: 

The following SMTP error was encountered:
Unable to send data: DATA

data: 

The following SMTP error was encountered:
Unable to send data: User-Agent: CodeIgniter Date: Fri, 13 May 2016 10:19:19 +0300 From: "PADigest" Return-Path: To: test123@yahoo.com Subject: =?utf-8?Q?Subiect_de_test?= Reply-To: "office@padiads.ro" X-Sender: office@padigest.ro X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: &lt;57357ff767c94@padiads.ro&gt; Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="B_ALT_57357ff767d02" This is a multi-part message in MIME format. Your email application may not support this format. --B_ALT_57357ff767d02 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Testez sa vad daca merge si daca pot sa trimit. Daca nu pot de ce nu pot ? --B_ALT_57357ff767d02 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Testez sa vad daca merge si daca pot sa trimit. Daca nu pot de ce nu pot ? --B_ALT_57357ff767d02--
Unable to send data: .

The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
Date: Fri, 13 May 2016 10:19:19 +0300
From: "PADigest" &lt;office@padiast.ro&gt;
Return-Path: &lt;office@padiasr.ro&gt;
To: test124@yahoo.com
Subject: =?utf-8?Q?Subiect_de_test?=
Reply-To: "office@padiast.ro" &lt;office@padiast.ro&gt;
X-Sender: office@padiast.ro
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: &lt;57357ff767c94@padigest.ro&gt;
Mime-Version: 1.0


Content-Type: multipart/alternative; boundary="B_ALT_57357ff767d02"

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_57357ff767d02
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Testez sa vad daca merge si daca pot sa trimit. Daca nu pot de ce nu pot ?


--B_ALT_57357ff767d02
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Testez sa vad daca merge si daca pot sa trimit. Daca nu pot de ce nu pot ?

--B_ALT_57357ff767d02--
</code></pre>