Welcome Guest, Not a member yet? Register   Sign In
I am new and in problem - mail library - sending emails using SMTP


Script works when I comment out the above code..
It is a Windows Server machine with IIS.. I really doubt if I'd be able to use sendmail.

sendmail is part of PHP, so that should still work. However, it's a bit strange that the Email library is causing the problem. I'd suggest making a copy of ./system/libraries/Email.php and putting it in ./system/application/libraries. Then you can edit ./system/application/libraries/Email.php, and add some debugging code to help you locate the problem.

EDIT: Sorry, I was referring to mail not sendmail.

Tried using 'mail' which returned following error
Quote:Severity: Warning

Message: mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.

Filename: libraries/Email.php

Line Number: 1519

Hmmm. I thought mail was meant to work without SMTP...

OK, next course of action I'd suggest would be to not pass any settings to the Email class. Run it, check the errors, then add one setting, and repeat until it starts hanging again. Hopefully that might help.

Line 1812 from Email.php Library where the error occurs:

while ($str = fgets($this->_smtp_connect, 512))

Does it tell anything?

There is an issue in the bug tracker pertaining to this - http://codeigniter.com/bug_tracker/bug/3407/

Doesn't seem to be making much progress, though since the problem is virtually impossible to replicate.

that's disappointing..
So what are my options then? how else can I send emails with SMTP authentication and using CI framework..?

The problem is that the issue can not be reproduced easily, which means it's hard for anyone other than the person with the issue to troubleshoot. My suggestion would be to play around with the custom Email library, and see if there's anything you can do to fix it. If someone can suggest a fix, I'm sure it'll be implemented in the next release.

Theme © iAndrew 2016 - Forum software by © MyBB