CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mails no longer send suddenly
Pages: [1]

Author Topic: Mails no longer send suddenly  (Read 531 times)

cgd

  • I’m new here
  • *
  • Posts: 3
  • Karma: 2
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.54
  • PHP version: 5.3.4
Mails no longer send suddenly
May 12, 2011, 12:32:40 pm
Note: I spent 30 minutes trying to make a post here without seeing an error about "external links" before I finally gave up. Look at the attached text file for a much better description.

I realize that "it won't send" is probably a fairly common complaint here, but this issue popped all of a sudden and I'm nearly out of ideas. Up until now, we had no problem sending messages using PHP mail(). A few days ago I noticed that one of our daily reports wasn't being sent. Cron has been acting quite shady as of late so I thought it was simply a cron problem. After a lot of tinkering, it's obvious that the jobs are running because it's recorded in the logs; the messages just don't show up. This problem is confined to CiviCRM; Drupal can still send messages fine, and I can do it from the command line e.g. php -r "mail('foo[at]bar.com', 'test', 'test');" without complications.

The PHP mail() log, however, has no record of CiviCRM's attempts. I'm totally flummoxed. I haven't changed any mail settings and the only thing I've done lately even remotely related to this was editing the report to rearrange fields. It's not just the reports though; any mail that CiviCRM tries to send vanishes into the abyss, whether a receipt, as an activity, test mailing, etc. The only lead I have is that the PHP mail() log isn't recording CiviCRM's attempts to send messages, so it must be failing before that point. If I send a message through the command line, it comes up in the log as expected.

If anyone has suggestions/advice, I'm all ears.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mails no longer send suddenly
May 12, 2011, 03:54:59 pm

Can you try to trace whats happening to the mail by adding some debugging code in:

CRM/Utils/Mail.php, function send

i would try with the "send email to contact" from view contact and see what is happening and why

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

cgd

  • I’m new here
  • *
  • Posts: 3
  • Karma: 2
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.54
  • PHP version: 5.3.4
Re: Mails no longer send suddenly
May 12, 2011, 06:08:49 pm
I figured it out and I hesitate to describe the solution because now I feel silly.

I mentioned that cron jobs were not executing reliably, and while I was troubleshooting that issue apparently I defined CIVICRM_MAIL_LOG and forgot what its side effects are; hence, no mail sent.

Thanks for the tip lobo, starting from there and eventually working my way back to the Mail_mail class helped me fix this. :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mails no longer send suddenly

This forum was archived on 2017-11-26.