S
Superman859
Guest
I'm working on developing my site on Plesk 8.6.0. I am trying to use the PEAR::Mail() function for PHP. However, I am not able to use authentication.
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $smtp_username,
'password' => $smtp_password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
//sends me an email using php mail() function instead, includes $mail->getMessage() in the body of mail
}
Above is the main idea of what I am doing with PEAR::Mail. It should all be correct, and all variables are filled in appropriately as far as I know.
The error returned is
authentication failure [SMTP: SMTP server does not support authentication (code: 250, response: {IP ADDRESS}
When I use no authentication as follows, PEAR::Mail works.
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => false,
'username' => $smtp_username,
'password' => $smtp_password));
Does anyone have any idea what is going on? Does SMTP Authentication not work in Plesk 8.6.0? This seems like quite an issue.
A few notes: Yes - under Server - Mail settings for Plesk I have it set to Authentication is required (SMTP is checked, POP3 locktime text field left blank and also unchecked). I have it set to Only use of full POP3/IMAP mail accounts names is allowed as well. The SMTP username used is one of my usernames (including domain name) I use to login to Horde webmail, along with the appropriate password.
Here are some other results:
[root@IP]# cat /etc/xinetd.d/smtp_psa
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
env = SMTPAUTH=1
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $smtp_username,
'password' => $smtp_password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
//sends me an email using php mail() function instead, includes $mail->getMessage() in the body of mail
}
Above is the main idea of what I am doing with PEAR::Mail. It should all be correct, and all variables are filled in appropriately as far as I know.
The error returned is
authentication failure [SMTP: SMTP server does not support authentication (code: 250, response: {IP ADDRESS}
When I use no authentication as follows, PEAR::Mail works.
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => false,
'username' => $smtp_username,
'password' => $smtp_password));
Does anyone have any idea what is going on? Does SMTP Authentication not work in Plesk 8.6.0? This seems like quite an issue.
A few notes: Yes - under Server - Mail settings for Plesk I have it set to Authentication is required (SMTP is checked, POP3 locktime text field left blank and also unchecked). I have it set to Only use of full POP3/IMAP mail accounts names is allowed as well. The SMTP username used is one of my usernames (including domain name) I use to login to Horde webmail, along with the appropriate password.
Here are some other results:
[root@IP]# cat /etc/xinetd.d/smtp_psa
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
env = SMTPAUTH=1
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}