My site is using the SMTP Authentication Support module to send mail. When using the 'Send an HTML mail to an arbitrary mail address' action and leaving the CC and BCC fields blank, there is a bug in the includes/mimemail.rules.inc file that causes the bcc and cc fields to always return true, because $settings['bcc'] and $settings['cc'] contain arrays (empty arrays, but enough to return true.) This causes the $header['Bcc'] and $header['Cc'] fields to get set (actually, with an unnecessary comma.) The SMTP module chokes if $headers items are set with empty strings or strings containing only a comma and it spits out an error like 'Error sending e-mail from myExampleSite to someuserATexamplemail.com : SMTP Error: The following recipients failed: '

I've attached a patch that solves this error on my site. It'd be great to get this committed into the module if it doesn't break anything else.

CommentFileSizeAuthor
#1 mimemail.960374_01.patch2 KBsgabe
headers.patch848 byteskim-day

Comments

sgabe’s picture

Title: bcc and cc headers problem » Don't set BCC and CC headers if they are empty
Status: Active » Fixed
StatusFileSize
new2 KB

Please create patches against CVS. However this bug applies for "Send an HTML email" action too and not just the Rules actions.

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.