Hello!
In my developer PC I have Ubuntu desktop 10.04, Apache 2.2, php 5.3.2-1ubuntu4. SMTP module (7.x-dev version) works.

Yesterday I install Ubuntu server 10.10 + LAMP (php version 5.3.3-1ubuntu9). All code and database were copied from developer PC to this server.

If I try to send email (for example, test email), I get following error:

* Warning: fputs() expects parameter 1 to be resource, integer given in SMTP->Authenticate() (line 217 of /var/www/hshop/sites/all/modules/smtp/smtp.transport.inc).
* Unable to send e-mail. Contact the site administrator if the problem persists.

How to solve my problem?

Comments

v.zhakov’s picture

I downgrade php version on server to same version on dev PC. But error still exists.
What can cause this problem?

scrapbrainuk’s picture

Did this problem ever get fixed? I'm having the same issue.

josesanmartin’s picture

Status: Active » Postponed (maintainer needs more info)

I was not able to reproduce the issue, using Mac, Apache/2.2.17 (Unix) PHP/5.3.4 and Drupal 7.x-dev version.

Reading the file smtp.transport.inc, I've noticed that the only case this error would pop out is if PHPMailer is not able to open a socket to the SMTP server.

Could you please go to admin/config/system/smtp and enable the option "Enable debugging" and post back here what you see?

v.zhakov’s picture

Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Thank you.

I think, it is my own problem. I must go to my mail server provider and maybe issue will be closed. I think, you right, it's socket problem.

mojacardave’s picture

Anybody else who is having this problem:

I had a very similar problem with PHPMailer - for me, the module never used to require a port to be specified, then suddenly it started failing unless a port was specified.

When I added the following line:

$mail->Port = 587;

to my PHP code after:

$mail->SMTPAuth = true;

it started behaving again.