Problem/Motivation
Currently, this module only supports one address as a 'TO' address. Drupal core and PHPMailer both support multiple 'TO' addresses. This issue seeks to extend Just SMTP to support multiple 'TO' addresses.
Currently, when a user tries to submit a comma-separated string of addresses, s/he will receive the following error:
The submitted to address (chris@example.net, chris@example.com) is not valid.
Proposed resolution
Drupal core supports multiple 'TO' addresses by storing them in a comma-separated string. PHPMailer allows for $this->addAddress() to be called multiple times per message. The proposed solution is to convert the string into an array, and then iterate through it, calling addAddress() for each address.
Remaining tasks
Submit patch for review
Community review
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | out.png | 23.11 KB | keshavv |
| #3 | just_smtp_multiple_to_address_support-2979496-3.patch | 1.88 KB | chris burge |
Comments
Comment #2
chris burge commentedComment #3
chris burge commentedNew patch that 1) corrects the drupal_set_message and watchdog messages and 2) checks $to['mail'] with valid_email_address() instead of $address.
Comment #4
keshavv commentedPatch applied cleanly and working perfect
Comment #6
berenddeboer commented