Answers.Body: <p>Put</p>
  
  <p>define('CIVICRM_MAIL_LOG', '/whereever/you/want/the/log');</p>
  
  <p>in civicrm.settings.php and this will log what it's trying to send. If the from address appears incorrect then whatever it is appearing as might lead you to the problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-04T14:16:56.500Z
Answers.Text: Make sure that that the user apache (or equivalent) is running as has permissions to write to that file -> so /files is usually a good place for 'whereever'
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-04T17:20:27.987Z
Answers.Text: Thanks, I'll give this a try and report back.  As part of troubleshooting I've removed all potential email addresses from before we used the extension so that only the correct default sending address remains, and I've even given the default organization the correct sending address, but the error remains.  Hopefully this will lead me in the right direction...
Answers.UserDisplayName: Tristan Bentley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-04T05:28:30.500Z
Answers.LastActivityDate: 2017-10-04T05:28:30.500Z
Answers.UserDisplayName: Demerit
Body: <p>So, I'm using the <a href="https://civicrm.org/extensions/sparkpost-civicrm-integration" rel="nofollow noreferrer">com.pesc.sparkpost</a> CiviCRM/Sparkpost integration extension.  It is working really well so far for just about everything except for the welcome email for mailing list group subscriptions.  I've tried through a drupal webform and through a Civi profile (using checkmark boxes for public subscriber groups).  In both cases, the double-opt-in email gets sent properly, and the link in the double-opt-in email works properly.  Upon clicking the link I am sent to a confirmation page with an error message (bellow), but the welcome email is never sent, and the transactional email is shown as pending on the user's profile in Civi.</p>
  
  <p>So, Transactional emails and Mass mail are definitely being sent fine through Sparkpost, and the subscription mechanism is working as intended.  So I'm pretty sure that my sparkpost smtp settings are working as intended, contrary to the error message.  So far it seems to be just these welcome emails that aren't sending properly.</p>
  
  <hr>
  
  <blockquote>
    <p>An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt.</p>
    
    <p>The mail library returned the following error message:
    Failed to send data [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 550, response: 5.7.1 Unconfigured Sending Domain )]</p>
    
    <p>This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are:</p>
    
    <ul>
    <li>Your SMTP Username or Password are incorrect.</li>
    <li>Your SMTP Server (machine) name is incorrect.</li>
    <li>You need to use a Port other than the default port 25 in your environment.</li>
    <li>Your SMTP server is just not responding right now (it is down for some reason).</li>
    <li>The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.</li>
    </ul>
    
    <p>(i) Name (email@example.com) has been successfully subscribed to the mailing list.</p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-02T16:51:17.860Z
Comments.Text: Just to be clear, I've also tested with CiviMail. contribution and membership receipts, and event registration receipts.  All appear to be sending correctly.
Comments.UserDisplayName: Tristan Bentley
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-15T17:38:46.313Z
Comments.Text: This may help : https://civicrm.stackexchange.com/questions/24657/event-registration-fatal-error-since-v5-0-1
Comments.UserDisplayName: Davy Ivins
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-17T12:06:34.487Z
Comments.Text: Thanks, I'll take a look.  It's a bit of a mess now - I tried the cividesk extension and had the same problem, then tried switching back to PESK, which is now unable to activate the extension at all in civi 4.6 (white screen).  I'm scheduling an update to latest civi 5 before trying again.
Comments.UserDisplayName: Tristan Bentley
Tags: <email><sparkpost>
Title: Civi CRM Sparkpost - pesc.sparkpost - Error Sending Group Subscription Welcome Emails
ThreadText: # Civi CRM Sparkpost - pesc.sparkpost - Error Sending Group Subscription Welcome Emails
  
  (Asked by: username_0 on 2017-10-02)
  
  So, I'm using the [com.pesc.sparkpost](https://civicrm.org/extensions/sparkpost-civicrm-integration) CiviCRM/Sparkpost integration extension. It is working really well so far for just about everything except for the welcome email for mailing list group subscriptions. I've tried through a drupal webform and through a Civi profile (using checkmark boxes for public subscriber groups). In both cases, the double-opt-in email gets sent properly, and the link in the double-opt-in email works properly. Upon clicking the link I am sent to a confirmation page with an error message (bellow), but the welcome email is never sent, and the transactional email is shown as pending on the user's profile in Civi.
  
  So, Transactional emails and Mass mail are definitely being sent fine through Sparkpost, and the subscription mechanism is working as intended. So I'm pretty sure that my sparkpost smtp settings are working as intended, contrary to the error message. So far it seems to be just these welcome emails that aren't sending properly.
  
  ---
  
  > An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt.
  >
  > The mail library returned the following error message:
  > Failed to send data [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 550, response: 5.7.1 Unconfigured Sending Domain )]
  >
  > This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are:
  >
  > * Your SMTP Username or Password are incorrect.
  > * Your SMTP Server (machine) name is incorrect.
  > * You need to use a Port other than the default port 25 in your environment.
  > * Your SMTP server is just not responding right now (it is down for some reason).
  > * The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.
  >
  > (i) Name (email@example.com) has been successfully subscribed to the mailing list.
  
  **Tags:** email, sparkpost
  
  > **Comments:**
  > **username_0**: Just to be clear, I've also tested with CiviMail. contribution and membership receipts, and event registration receipts.  All appear to be sending correctly.  
  > **username_1**: This may help : https://civicrm.stackexchange.com/questions/24657/event-registration-fatal-error-since-v5-0-1  
  > **username_0**: Thanks, I'll take a look.  It's a bit of a mess now - I tried the cividesk extension and had the same problem, then tried switching back to PESK, which is now unable to activate the extension at all in civi 4.6 (white screen).  I'm scheduling an update to latest civi 5 before trying again.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-10-04. Score: -1
  
  Put
  
  define('CIVICRM\_MAIL\_LOG', '/whereever/you/want/the/log');
  
  in civicrm.settings.php and this will log what it's trying to send. If the from address appears incorrect then whatever it is appearing as might lead you to the problem.
  
  > **Comments:**
  > **username_3**: Make sure that that the user apache (or equivalent) is running as has permissions to write to that file -> so /files is usually a good place for 'whereever'  
  > **username_0**: Thanks, I'll give this a try and report back.  As part of troubleshooting I've removed all potential email addresses from before we used the extension so that only the correct default sending address remains, and I've even given the default organization the correct sending address, but the error remains.  Hopefully this will lead me in the right direction...  
  
  ---
  
  