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

[eluser]verynewtothis[/eluser]
Code:
$this->email->send();

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.
#12

[eluser]TheFuzzy0ne[/eluser]
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.
#13

[eluser]verynewtothis[/eluser]
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
#14

[eluser]TheFuzzy0ne[/eluser]
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.
#15

[eluser]verynewtothis[/eluser]
Line 1812 from Email.php Library where the error occurs:

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

Does it tell anything?
#16

[eluser]TheFuzzy0ne[/eluser]
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.
#17

[eluser]verynewtothis[/eluser]
that's disappointing..
So what are my options then? how else can I send emails with SMTP authentication and using CI framework..?
#18

[eluser]TheFuzzy0ne[/eluser]
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