Send group welcome message only if automated template is enabled
Currently, there isn't a easy way to turn off welcome email during double opt-in for group subscription.
One way achieve is disable 'Welcome Message' template at /civicrm/admin/component?reset=1
. This will prevent sending confirmation email. However, it still tries to send an email which throws a warning message.
Mailing Error: Unable to send email. Please report this message to the site administrator
Proposed fix:
Don't attempt to send emails if 'Welcome Message' is disabled.