I have installed the SMTP module to enter specific authentication in order to send messages via smtp.strato.com:587 and using username/password. When I send out a test message (which is an option in the SMTP module), the message is sent succesfully. Now, when I try to notify my users through the messaging module, I get the following message:
warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (Connection refused)
I have checked the variable table and the variables concerning smtp are correctly pointing to the Strato settings.What am I overlooking?
Comments
Comment #1
edvanleeuwenTemporarily solved it
1. By adding a variable fetch from SMTPAuth in messaging_phpmailer.module:
2. By filling in the fields in class.phpmailer.php.
I think the latter is not proper, but it fixes my problem for now. Could anyone comment?
Comment #2
gregglesI have this problem as well. I think it should be configurable through the admin interface to use a remote SMTP server.
Comment #3
jose reyero commentedNew settings form an configurable smtp server in the module.
Comment #4
gregglesThanks, Jose!
When you say "New" do you mean "6.x-1.1" or "6.x-1.x-dev as of a few hours ago" ?
I'm trying the latter, but it would be nice to have this issue marked as a duplicate of the issue where you implemented this feature or linked to a commit message where the feature was added or something like that to give some context to the fix.
Comment #5
gregglesIt seems that this allows Drupal to use a remote SMTP server, but only if that server is open to relaying from your Drupal site, right?
I'm currently using the smtp module - http://drupal.org/project/smtp - to send mail via an stmp server that uses authentication. I think it would be great if the Messaging module could just use the default Drupal mailer (which in my case would be the SMTP module).
Comment #6
cglusky commentedJust a heads up on SMTP module - If you are going to use this with Mail2Web the SMTP module modifies headers (last time we used it anyway - about 4 months ago) so maintaining integrity of email headers as it passes through different modules needs to be watched carefully.
Comment #7
jose reyero commented@greggles,
Yes, no support yet for authentication, unless someone wants to post a patch..
The messaging_mail module uses the default Drupal mailer, it should work with smtp, though I haven't tried
@cglusky
Maybe you mean this issue, just fixed, #363001: messaging_phpmailer does not use passed headers - fails with mail2web module
Again, patches for phpmailer improvements will be welcomed. I'm just not using it for any site.
Comment #8
gregglesOk, then I guess we can call this fixed. Thanks for letting me know about messaging_mail.
Comment #9
cglusky commentedjose,
i would have to take a look at it again, but i still expect there might be issues with the SMTP module and Mail2Web. I would have to see what the headers look like after they pass through notifications and messaging and then get sent via SMTP Authentication module. I am sure your fix works great for this specific issue, but last i used SMTP Auth module it was modifying headers before the email was sent. mail2web also modifies headers in very specific ways to handle threading etc and i do not believe the two are currently compatible. but that is OT for this issue and probably belongs in the SMTP Auth and/or M2W queues. It's on my very long list of things to do.
R,
C
Comment #11
WeRockYourWeb.com commentedWorking for me too now (with Messaging + Rules + SMTP + Native Drupal Mail). But only if I send the email to a non-aliased email address on my host - interesting.