I've installed the smtp module and copied the unzipped Phpmailer-v5.1.zip into the folder phpmailer under smtp. When I do a "E-mail address to send a test e-mail to: " it give me the following errors:
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
SMTP Error: Could not connect to SMTP host.

I've tried with different smtp server addresses as I've got numerous domains and I've tried this on different domains too. The websites that I've done previous for clients that used to work this way all of a sudden is also giving me these errors.. I have not changed anything yet it just stopped working???

Please can you help me?

Comments

guntherdevisch’s picture

Having exact the same problem,

Also looking into it.

Greets,
Gunther

supahjan’s picture

I'm having this error:

SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
SMTP Error: Could not connect to SMTP host.

Any idea how to solve this?

josesanmartin’s picture

Category: bug » support

Looks like your server can't ping the SMTP server. Can you check that?

(use "support request", please)

scottprive’s picture

This module works via the included PHPMailer PHP library.

When in doubt, try a SIMPLE test like a standalone (outside of Drupal) SMTP email test which uses PHPMailer.
Here is one example you can customize: http://phpmailer.worxware.com/index.php?pg=examplebsmtp

If that does not work, then most likely you are not specifying (in phpmailer's config) the correct hostname of your SMTP server, or your SMTP credentials are not valid.

Or you have a DNS or routing issue reaching that server (you can try to ping that server, but a better test is to telnet to the actual SMTP server port, and see if you get a connection/mailserver greeting).

erok415’s picture

subscribing

wundo’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Closing very old (dead) issues, if you think this is still relevant please re-open.

sarbhai’s picture

I cound not send the mail, while i tried to contact service provider, Hi answer following:
please help me to fix this issue

After the recent update of cPanel v64, all outgoing emails sent through PHP scripts will need to be authenticated and routed through an email address created through cPanel. This is done to prevent Malware injected spam emails sent through the server and to prevent the server IP from being blacklisted. Please follow the instructions for Wordpress or Joomla, or please contact your website developer and request them to update the PHP code with SMTP authentication, you can find PHP sample code below

PHP Sample Code:
https://tinyurl.com/y8s73ova (or) https://github.com/PHPMailer/PHPMailer.git

$mail->Host = "mail.domain.com";
$mail->Username = "feedback@domain.com";
$mail->Password = "1234567890";
$mail->AddAddress("my-email@gmail.com", "My Name");
$mail->Subject = "Feedback from your website!";
// Enter "mail.my-domain.com"
// Enter an email address created through cPanel
// Enter the email password created through cPanel
// Enter the recipient "to" email address
// For subject "Any Preferred Email Subject";