Jump to:
| Project: | |
| Version: | 4.6.x-1.x-dev |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | paddywwoof |
| Status: | closed (fixed) |
Issue Summary
host (crystaltech) recently requires valid smtp from address for emails to work from php.
I have set up and run the class.smtp.inc and smtp.inc and added the conf[] to settings.php however I still get a message 'unable to send email. please contact site admin' which is me!
I have put the same info as in smtp.in into example.php and this runs fine, sending a test email to the same address I am tyring to get a replacement password for. It looks like it's something in the working of drupal. I have checked in the database and the site from address is valid (paddy@wwoof.org)
$params['host'] = ini_get('SMTP');
$params['port'] = 25;
$params['helo'] = exec('hostname');
$params['auth'] = TRUE;
$params['user'] = 'paddy@wwoof.org';
$params['pass'] = 'myemailpasswordhere';
any help much appreciated
Paddy
Comments
#1
I have tried deleting the users and starting again whereupon I got an "unable to fork [hostname].." error. If I change this back to $_SERVER['HTTP_HOST'] which still works in the example.php but doesn't send an email from drupal. However I now get a message saying that the email has been sent with the password and further instruction! If I try to get a password resent I get the usual "Unable to send email.." message.
I have drupal running fine on my site which is apache. However on IIS with shared hosting there is this problem...
#2
After not getting anywhere with the class.smtp.inc I followed advice elsewhere on drupal.org and put in phpmailer and now it works!!!