Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello - sorry to post this as an issue if it doesn't qualify. However, I can not find a solution for setting up an external SMTP server for mail functions. The only solution that seems to work is using smtp.inc and class.smtp.inc - however, class.smtp.inc is unavailable (the host site for the file, phpguru.org has been down for days). Is it possible to attach the class.smtp.inc file somewhere in the Drupal site for people to use?
Comment | File | Size | Author |
---|---|---|---|
#2 | class.smtp.inc | 9.76 KB | oc |
Comments
Comment #1
eodonnell CreditAttribution: eodonnell commentedIf anyone out there is using an external smtp server and has the class.smtp.inc file that they downloaded from phpguru.org - please contact me! http://drupal.org/user/28950/contact
Comment #2
oc CreditAttribution: oc commentedI found the file and installed and tested it, using Civicspace 0.8.1.2.
File is attached.
Comment #3
oc CreditAttribution: oc commentedAnd here are some detailed instructions... this solution should
enable you to also modify the smtp.inc to specify a username
and login for your external SMTP server!
THE FIX:
I noticed we were getting errors from our installation of
Civicspace on Dreamhost. The problem was that some
recipients were not receiving mail from us as a result of spam
filtering.
The fix for this was to modify Drupal settings, by installing
some custom SMTP code and then changing the settings for
our mail server, so that Drupal would use mail.ourserver.org
(instead of the default, which turned out to be 'localhost'
(or tetris.dreamhost.org).
1) download the following 2 files and place in Includes:
http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/tricks/smt...
http://www.lemure.net/~chuck/openbsd_help/class.smtp.inc
2) Edit smtp.inc so that the default smtp server address is no longer used:
before: $params['host'] = ini_get('SMTP');
after: $params['host'] = "mail.ourserver.org";
3) make Drupal use this mail sending wrapper by adding the following line at the end
of conf.php, before the last ?> tag:
$conf["smtp_library"] = "includes/smtp.inc";
Hope this helps.
-rich
Comment #4
oc CreditAttribution: oc commentedfyi, the two lines in smtp.inc that you want to modify, in order to set up smtp authentication, look like this:
// Username for authentication
//$params['user'] = 'testuser';
// Password for authentication
//$params['pass'] = 'testuser';
-rich
Comment #5
ricabrantes CreditAttribution: ricabrantes commentedClosed..
Comment #6
randya CreditAttribution: randya commentedWhat is recommended for the latest versions of PHP and Drupal?
Comment #7
joachim CreditAttribution: joachim at Torchbox commentedClosing very old issues on this project.