0

I hope I'm on the right site, because it's a crossover between drupal and server configuration...

I am currently using shared hosting for a website and am encountering mail problems while sending mails from the website (drupal CMS). The problem is I only host the website, the mail server is located with another host causing the mails to their own domain to be dropped.

Basically I have example.com and I'm trying to send an email to john.doe@example.com from drupal. To avoid having the mail dropped and to avoid changes on the example.com mailserver side I would prefer to send mails from website2.com which is hosted on the same server.

According to my host I should use the "-f" option of the PHP mail() function to force my website.com e-mailaddress, but I cannot believe this is required since this is not supported by the Drupal core. I cannot be the only one in this scenario, yet I do not find any solution. Can somebody point me in the right direction ?

Technical information:

  • Running Installatron

  • Shared hosting with two domains: example.com and website2.com

  • External mailserver, dns is managed by other host.

migrated from serverfault.com Oct 15 '14 at 23:34

This question came from our site for system and network administrators.

  • Since you're not the system administrator your question may technically be off-topic here. But, if Drupal uses the simple PHP mail() command maybe you can set php_admin_value sendmail_path "/usr/sbin/sendmail -ffrom@website2.com -t -i" in your .htaccess file to force the envelope sender. – HBruijn Oct 15 '14 at 20:14
  • Hi, tx for your help. I've tried and google't it, but according to the docs php_admin_value can not be set via .htaccess. – JNDPNT Oct 16 '14 at 18:12
  • Have you looked into the SMTP module? – Adam Balsam Oct 17 '14 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.