CodeIgniter Forums
Email class SMTP Auth - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Email class SMTP Auth (/showthread.php?tid=11498)



Email class SMTP Auth - El Forum - 09-10-2008

[eluser]Michael;[/eluser]
Greetings,

I am attempting to use the CI Email class to send email from a contact form and am having some problems with the SMTP Auth. Mail sends out fine so long as the server allows the "nobody" sender, but obviously this is disabled for security purposes ( my host was kind enough to turn this on for me so that I can test ).

This is my Email.php in /config:
Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
$config['useragent'] = "CodeIgniter";
$config['protocol'] = "SMTP";
$config['_smtp_auth']   = TRUE;
$config['smtp_host'] = "*****";
$config['smtp_user'] = "*****";
$config['smtp_pass'] = "*****";
$config['smtp_port'] = 25;
$config['wordwrap'] = TRUE;
$config['wrapchars'] = 76;
$config['mailtype'] = "html";
$config['charset'] = "utf-8";
$config['validate'] = FALSE;
$config['priority'] = 3;
$config['newline'] = "\r\n";
$config['bcc_batch_mode'] = TRUE;
$config['bcc_batch_size'] = "200";
?>

I have seen this bug report ( http://codeigniter.com/bug_tracker/bug/4615/ ) and the associated thread. I've also searched the forums and have had zero luck finding a solution.

Any help anyone could provide would be greatly appreciated.

Michael


Email class SMTP Auth - El Forum - 09-11-2008

[eluser]Michael;[/eluser]
Just in case anyone else evers run across something like this: make sure smtp is all lowercase:

$config['protocol'] = "SMTP";

Should be:

$config['protocol'] = "smtp";

Cheers


Email class SMTP Auth - El Forum - 12-01-2008

[eluser]piker[/eluser]
God bless you for this email. You save my live :-)

I can't find any information about sending emails in Codeigniter via smtp.
Here is only one place where I can get one.

Documentation do not explain smtp authentication. Why ?

$config['protocol'] = "smtp";
$config['_smtp_auth'] = TRUE;


Email class SMTP Auth - El Forum - 06-13-2013

[eluser]toymachiner62[/eluser]
[quote author="piker" date="1228120019"]

Documentation do not explain smtp authentication. Why ?

$config['protocol'] = "smtp";
$config['_smtp_auth'] = TRUE;[/quote]

I too am also curious why this is not mentioned. I spent 3 days trying to figure it out and ended up using PHPMailer.