Answers.Body: <p>My sense is that this is more likely to be a hosting/configuration issue than a Wordpress issue. Though it could of course be a hosting issue that only affects Wordpress sites :p.  Did you try testing on <a href="http://wpmaster.demo.civicrm.org/" rel="nofollow noreferrer">http://wpmaster.demo.civicrm.org/</a>?</p>
  
  <p>'Empty mail protocol' is from the more helpful end of the error message spectrum.</p>
  
  <p>I would first check on this page civicrm/admin/mailSettings?reset=1 that the <strong>protocol</strong> is set for the processor you are using for <strong>Bounce processing</strong>.</p>
  
  <p>If and when you have ruled out any issues there, it would be time to start digging a little deeper...</p>
  
  <hr />
  
  <p><em>Hopefully you don't have to read this far, but just in case...</em></p>
  
  <p>Depending on your willingness to jump into the code case, the next step would be to look through the code of the Fetch Bounces scheduled job. <a href="https://github.com/civicrm/civicrm-core/blob/master/api/v3/Job.php#L356" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/api/v3/Job.php#L356</a> passes of to <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php</a> quite quickly.</p>
  
  <p>It looks like your error message is being generated here: <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php#L165" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php#L165</a> and here: <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L57" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L57</a>.</p>
  
  <p>So the question is, why isn't $protocols[$dao->protocol] set on <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L56" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L56</a>?</p>
  
  <p>Happy to expand on this answer if necessary.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-06T21:48:19.333Z
Answers.Text: Thanks - yes went down that route and found that I'd got two default mail accounts - I'd created a new one when I thought I had edited the example one. Deleting the example one solved the problem!
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-10T08:39:48.320Z
Answers.LastActivityDate: 2017-04-10T08:39:48.320Z
Answers.UserDisplayName: michaelmcandrew
Body: <p>I have got everything else working but I get the following error from the Fetch Bounces scheduled job (in the scheduled job log)</p>
  
  <blockquote>
    <p>Full message:  Finished execution of Fetch Bounces with result:
    Failure, Error message: A fatal error was triggered: Could not connect
    to MailStore for return@downham.org.uk@downham.org.uk.mail.aa.net.uk</p>
    
    <p>Error message: </p>
    
    <p>Empty mail protocol</p>
  </blockquote>
  
  <p>I'm running on WordPress at a hosting provider. I've checked that I can access the mail server from elsewhere, re-entered the data in case of a typo. Tried POP as well as IMAP, with/without SSL. Also tried with Google mail server instead. Finally I tried from one of the Drupal CiviCRM demo servers and it worked from there. I also tried telneting into the IMAP server from the hosting site and that worked fine so can't be a network issue. So it looks like either its a WordPress issue or something about the hosting provider configuration.</p>
  
  <p>Any suggestions as to where to look next?</p>
  
  <p>Many thanks - Mick</p>
  
Tags: <email>
Title: mail Fetch Bounces errors
ThreadText: # mail Fetch Bounces errors
  
  (Asked by: username_0 on 2017-04-07)
  
  I have got everything else working but I get the following error from the Fetch Bounces scheduled job (in the scheduled job log)
  
  > Full message: Finished execution of Fetch Bounces with result:
  > Failure, Error message: A fatal error was triggered: Could not connect
  > to MailStore for return@downham.org.uk@downham.org.uk.mail.aa.net.uk
  >
  > Error message:
  >
  > Empty mail protocol
  
  I'm running on WordPress at a hosting provider. I've checked that I can access the mail server from elsewhere, re-entered the data in case of a typo. Tried POP as well as IMAP, with/without SSL. Also tried with Google mail server instead. Finally I tried from one of the Drupal CiviCRM demo servers and it worked from there. I also tried telneting into the IMAP server from the hosting site and that worked fine so can't be a network issue. So it looks like either its a WordPress issue or something about the hosting provider configuration.
  
  Any suggestions as to where to look next?
  
  Many thanks - username_0
  
  **Tags:** email
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-04-10. Score: 2 | Accepted answer
  
  My sense is that this is more likely to be a hosting/configuration issue than a Wordpress issue. Though it could of course be a hosting issue that only affects Wordpress sites :p. Did you try testing on <http://wpmaster.demo.civicrm.org/>?
  
  'Empty mail protocol' is from the more helpful end of the error message spectrum.
  
  I would first check on this page civicrm/admin/mailSettings?reset=1 that the **protocol** is set for the processor you are using for **Bounce processing**.
  
  If and when you have ruled out any issues there, it would be time to start digging a little deeper...
  
  ---
  
  *Hopefully you don't have to read this far, but just in case...*
  
  Depending on your willingness to jump into the code case, the next step would be to look through the code of the Fetch Bounces scheduled job. <https://github.com/civicrm/civicrm-core/blob/master/api/v3/Job.php#L356> passes of to <https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php> quite quickly.
  
  It looks like your error message is being generated here: <https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Mail/EmailProcessor.php#L165> and here: <https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L57>.
  
  So the question is, why isn't $protocols[$dao->protocol] set on <https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore.php#L56>?
  
  Happy to expand on this answer if necessary.
  
  > **Comments:**
  > **username_0**: Thanks - yes went down that route and found that I'd got two default mail accounts - I'd created a new one when I thought I had edited the example one. Deleting the example one solved the problem!  
  
  ---
  
  