Hi,
I have a basic Drupal install and a bunch of users.
How could my Drupal users receive e-mails from the outside world at their address (e.g. [email protected])?
Thank you!
Hi,
I have a basic Drupal install and a bunch of users.
How could my Drupal users receive e-mails from the outside world at their address (e.g. [email protected])?
Thank you!
Depending on your SMTP server setup (ie Exchange, php.mail, or local mail clients) A good start would be to:
update your php.ini to this
[mail function] ; For Win32 only. SMTP = smtp.maildomain.com
Drupal is a system for serving web pages, it does not run mail servers. If there is no mail server present on your system, you will need to install one. Once you have a mail server running, you can install a Drupal module such as Webmail Plus to provide a webmail interface for your users.
For the case you describe I think the best way to handle this is to set up a mail server with automatic forwarding, and run a batch process once a day or so that extracts the usernames and their e-mail addresses from your Drupal database's user
table. Drupal itself doesn't need to be involved in the actual sending and receiving of e-mail at all.
If you are using the Drupal username as the first part of the e-mail address then your export script could just run a query like
SELECT name, mail
FROM `users`
WHERE 1
as part of a shell script that populates a table of e-mail addresses to forward to. For the correct formatting and configuration of such a file you'll really need to dig into the documentation of your e-mail server.
Thanks all!
You've put me in the right direction and I ended up writing a script that reads the Drupal's users table and configures the mail server accordingly. I've turned it into a small Python library for WebFaction, available at http://code.google.com/p/drupal2mail.
Hope it's useful for some!