Community Support for OpenDocMan (Deprecated)
OpenDocMan cannot send mail SMTP returns 501 error - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Bug Reports (https://forum.opendocman.com/forum-8.html)
+--- Thread: OpenDocMan cannot send mail SMTP returns 501 error (/thread-369.html)



OpenDocMan cannot send mail SMTP returns 501 error - kangz - 01-27-2011

Hi,

Please help. I have noticed that emails are not being sent when approving files. When i go to the php error log the error returned is:

Code:
[27-Jan-2011 12:40:18] PHP Warning:  mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 501 Syntax error, parameters in command &quot;MAIL FROM:&lt;JMS Webmaster &lt;[email protected]&gt;&gt;&quot; unrecognized or missing in C:\wamp\www\tst\opendocman\toBePublished.php on line 378

[27-Jan-2011 12:40:18] PHP Warning:  mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 501 Syntax error, parameters in command &quot;MAIL FROM:&lt;JMS Webmaster &lt;[email protected]&gt;&gt;&quot; unrecognized or missing in C:\wamp\www\tst\opendocman\functions.php on line 275

im testing on windows environment and the same smtp sends emails fine with other applications on the server.


Re: OpenDocMan cannot send mail SMTP returns 501 error - Stephen - 01-27-2011

I will try to replicate the issue with 1.2.6beat. What version are you using?


Re: OpenDocMan cannot send mail SMTP returns 501 error - kangz - 01-27-2011

i'm using version 1.2.5.7. somewhere it seems to be adding its own MAIL FROM <> to the already formed header:
Code:
$mail_from='NAME <[email protected]>';
in php.


Re: OpenDocMan cannot send mail SMTP returns 501 error - Stephen - 02-03-2011

@kangs,

Can you try out 1.2.6beta and let me know if you have the same issue?


Re: OpenDocMan cannot send mail SMTP returns 501 error - kangz - 02-07-2011

Hey,
I tried in 1.2.6 beta and it sends the email with no problem. i've looked at the code and it seems quite similar with 1.2.5.7 though i didn't dig deep.
Anyway it's ok since i see you are relying on the php mail() to send email but i'll implement swift mailer to send mail through smtp on the system i'm working on, since i may not have access to the configuration files on the production server. (Unless you had that too in mind of course)