@GinoSatta wrote:
I'm having a issue with SMTP setting. Since I'm running OJS (2.4.8-1) on a commercial server, I'm not able to use mail() function and I really need to setup an external SMTP server to send emails.
It didn't work. I telnet tested my hosting provider's SMTP server and I've been able to authenticate (PLAIN method, 587 port), but with some difficulties. I had to base64 encode userid and pwd using the following trick I found here.
I had to run
perl -MMIME::Base64 -e 'print encode_base64("\000user\@domain\000password")'
Without the "\000" prefix and the escaping of @, authentication was rejected. With both it succeded.
I read this was due to perl interpreter. I tried all possible combinations of userid and pwd in config.inc.php but could not get it to work.
I tried to figure out what the problem was and I read the file /lib/classes/mail/SMTPMailer.inc.php where I found the lines for AUTH PLAIN (250 and following:/** * Authenticate using PLAIN. * @return boolean */ function authenticate_plain() { $authString = $this->username . chr(0x00) . $this->username . chr(0x00) . $this->password; if (!$this->send('AUTH', 'PLAIN ' . base64_encode($authString))) return false; return $this->receive('235'); }
Is the variable $authString well defined? Why is there a repetition of $this->username . chr(0x00)?
Please forgive my naive questions: I'm not a developer at all: I'm an anthropologist trying to setup a scholarly journal.
Posts: 1
Participants: 1