Welcome Guest, Not a member yet? Register   Sign In
Email class SMTP Auth
#1

[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
#2

[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
#3

[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;
#4

[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.




Theme © iAndrew 2016 - Forum software by © MyBB