I have a webform set up do that a form component field is set to send the form to whatever email address is entered.

Is it possible to send to multiple email addresses using this field? For example a comma separated list like can be done in the "default email to address"

Comments

quicksketch’s picture

I don't think a comma separate list works for the email component because the validation doesn't let the user enter multiple e-mails, it will kick back and error saying that the e-mail is not valid.

iancawthorne’s picture

Ye, that is the problem I'm getting. Is there any other solution for this sort of scenario?

wintervanilla’s picture

I'm also curious about this. Has anyone found a solution?

Thanks!

quicksketch’s picture

You actually can comma-separate multiple e-mails, contrary to what I said in #1.

quicksketch’s picture

Status: Active » Closed (fixed)
mseraphim’s picture

I posted this on a different to as well but its all the same thing:
http://drupal.org/node/626532#comment-2957994

#18
mseraphim - May 12, 2010 - 14:51
Version: 6.x-1.0-beta4 » 6.x-1.x-dev

I'm having exactly the same problem. Perhaps I could describe the problem better and hope someone will respond.

My current installation:
Wamp 2 Server on windows installation,
Drupal 6.16 - Latest on drupal site at this time.

Topic1:
What I try to do is send a message using the contact form from my admin user to two or more recipients:
This is a new installation and I'm also new to Drupal.
1. I created two different users (user1@example.co.za, user2@example.co.za) and have the admin user (admin@example.co.za).
2. I enabled the contact form module.
3. Added a category (website information) and included two recipients: text in box "user1@example.co.za,user2@example.co.za" without the inverted commas - and saved it.
4. I added a primary link on the page called "Contact us" (when clicked on it, it takes me to the contact us page.
5. Automatically my admin name is in and my email address. I type a subject, select the website information category, type my message and press "send email"

This message comes up in a red box:
" * warning: mail() [function.mail]: SMTP server response: 501 5.1.7 Bad sender address syntax in C:\wamp\www\includes\mail.inc on line 193.
* Unable to send e-mail. Please contact the site administrator if the problem persists. "

On the report logs the error is described as:
"Error sending e-mail (from user1@example.co.za,user2@example.co.za to admin@example.co.za)."

This report tells me that it is trying to send email from the 2 recipients to my admin user.

The email does in fact send to user1 and user2 but why does it come up with this error message?

If I remove the one recipient in other words send an email using the contact form from my admin account to user1, then user1 gets the email and there is no error message.

The contact form is part of Drupal's core installation so surely this was tried and tested, but it doesn't work for me. any help on topic 1?

Topic 2:
If I replace the recipients with a gmail account ex. user@gmail.com and send using the contact form to that recipient I get the following message:

"warning: mail() [function.mail]: SMTP server response: 554 5.7.1 : Sender address rejected: Access denied in C:\wamp\www\includes\mail.inc on line 193.
Unable to send e-mail. Please contact the site administrator if the problem persists.
"
The report log shows:
"Error sending e-mail (from user@gmail.com to admin@example.co.za)."

any help on topic 2 please?

I think topic 1 and topic 2 comes down to the same problem. Instead from sending mail from admin to users, the contact form module turns it around and tries to send mail from users to admin. The mail does get delivered, but why the error message?

any clever developers out there?

Thanks ya all.

Mseraphim