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
Comment #1
v.zhakov commentedI downgrade php version on server to same version on dev PC. But error still exists.
What can cause this problem?
Comment #2
scrapbrainuk commentedDid this problem ever get fixed? I'm having the same issue.
Comment #3
josesanmartin commentedI 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?
Comment #4
v.zhakov commentedThank 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.
Comment #5
mojacardave commentedAnybody 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.