Sending email from a Drupal site

Events happening in the community are now at Drupal community events on www.drupal.org.
camhoward's picture

How do I get a Drupal 6.20 site to send email using the site's email address? I have put the address I want used in the "E-mail address" field on the Site configuration > Site information page and the site refuses to use it.

Mail sent from the site, such as to a user who requests a new password or email sent via an Action triggered by a Workflow setting, is being sent using this format in the FROM field: domainusername@webhostname.com

It should be using this format: name@domain.com

The puzzling thing is that the test site is using the correct email address in the FROM field and the live production site is not. I've gone through all the configuration settings and they are exactly the same. Both sites are hosted by the same web host, although on different servers.

Is there another place the default FROM email address needs to be set?

Thanks!
Cam

Comments

Contact your webhost

Jehf's picture

Your webhost's smtp server may be messing with you. Perhaps they impose some overly aggressive policies until they know you're not a spammer.

Setup?

ppatterson-edc's picture

Hey Cam - did you set the Drupal installation up yourself/manually, or did you use your webhost's automatic installation? If it's the latter, it might have set the webhost up as User 1 - that would throw things off a bit.

Thanks and php.ini

camhoward's picture

Hi Jeff and Pat,

Thanks for the suggestions. I don't think the webhost is set up as User 1 because I created the username and password for User 1 when I installed Drupal. If I have misunderstood this, please let me know.

The webhost support tech said there was no problem with SMTP or sendmail and that the problem must be with Drupal. He also insisted that the problem was because the admin email address uses a different domain name from the site's domain name.

I solved the problem by editing the php.ini file to add the correct email address to the sendmail_from and sendmail_path lines. Does this seem like a good idea or will it have unintended consequences?

Thanks,
Cam

New Hampshire

Group categories

Regional Audience

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: