Installed Mandrill module, signed up for free account, and all looked fine.
When mandrill module configured for "test" mode, the response if positive and all looks fine.
But when configured to be "on", and a form processed, the following error is thrown:
Mandrill_Exception: - in Mandrill->__construct() (line 31 .....
And i get a messed up layout on page.
I have disabled the module for now - any ideas where to look first?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 1594244-12-drupal_http_request.patch | 2.31 KB | fenstrat |
| #11 | drupalhttprequest-1594244-11.patch | 1.72 KB | dabblela |
Comments
Comment #1
lsolesen commented@mudsurfer Do you still have this issue with beta1 - otherwise you can close it?
Comment #2
mudsurfer commentedUpdated module to 7.x-1.0-beta1
when the module configuration "Mandrill Mail interface status" is set to "on", and I try to send an email/webform/contactform, it gives me a whitescreen and this error:
When I set the module configuration "Mandrill Mail interface status" to "off", the site resumes operation normally, and I can send via php sendmail.
So, sorry, the changes to beta1 did not fix anything for me.
Cheers
Comment #3
Anonymous (not verified) commentedI overcame this problem by extending the CURL timeouts. Sorry I don't have a patch to upload, but this is the patch:
The timeout constants are in seconds. There's another option to set up millisecond timeouts, but it's a bit tricker and probably this project should stick with whole second timeouts.
Comment #4
lsolesen commentedThis does not make it possible for me to send test mails if those issues are related.
Comment #5
rowbotony commentedI'm also still having this issue with -beta1 - same procedure: install, enable, add my api key, verify DKIM and SPF, turn ON, then send a test message resulting in Error:
Mandrill_Exception: - in Mandrill->__construct() (line 31 of /var/www/htdocs/sites/all/modules/mandrill/mandrill.class.php).I'm on AWS EC2, should I change to the -dev branch?
Comment #6
nafmarcus commentedThe two-line code change above did not do fix the problem for me either and we would very much like to move to MailChimp for mail relay.
Comment #7
levelos commentedThe operation timeout is already set in Mandrill::http_request().
We could bump up the connection timeout as @bangpound suggets. But seems if just the connection is timing out, there are other issues? We could also consider using drupal_http_request() instead of curl.
Comment #8
dabblela commentedAlso having this issue, and it seems to be something on a system level, as it worked well on my local development environment but failed when moved to production.
Also worth noting that Mandrill shows nothing in the API Logs.
Comment #9
dabblela commentedSwitching from curl to drupal_http_request() fixed this issue for me, but curl would be ideal as I've found it to be much faster.
Comment #10
fenstrat@manatwo Care to share how you used drupal_http_request()? I'm having exactly the same issue you had, was working fine locally, but is failing on production.
Comment #11
dabblela commentedThis a real basic patch; I'm almost positive it needs work to be committed but I'm using it in production for now.
Comment #12
fenstratThanks @manatwo. That worked a treat for me, sending on production and locally finally works.
I've made a few changes in the attached. I've taken the knife to http_request() as after what you'd done all it was doing was calling set_time_limit() so I've made $this->timeout a param to drupal_http_request() and gotten rid of http_request() alltogether. Also changed json_encode() to drupal_json_encode().
Comment #13
levelos commentedDoes anyone have any details, E.g., server messages, about the curl errors? From everything I understand, curl is a better overall choice, unless, of course, it doesn't work ;)
Comment #14
fenstrat@levelos I've just checked apache error logs, there's nothing there. It doesn't seem to get that far, the error is logged in watchdog as
Error sending email from from@example.com to to@example.com. 500: You must specify a key value - Array. Though I've also seen the Mandrill_Exception error noted here in #0 though I can't seem to reproduce that now. One thing is certain from my end, when curl is removed as per #12 all these errors disapear and sending works as it should.Comment #15
lsolesen commented@levelos. I cannot find any server errors. I am on an ubuntu server on Linode where everything has been installed from the repositories. Getting the same errors as @fenstrat.
Comment #16
lsolesen commentedI can confirm that the patch in #12 fixes the problem for me also.
Comment #17
jlab commentedThe patch in #12 has worked quite well for me as well.
Comment #18
pal4life commentedHi,
That patch did take away the Api -key error message but I have still not been successful in receiving a test email. Now there is no more anything in the drupal logs. Although Mandrill logs show this
Jul 5, 2012 8:01 pm /messages/send.json
{"message": null, "key": "xxxxxxkeyidhere"}
{}
Not sure why the message is null. I will open a separate ticket for this.
Thanks.
Comment #19
pal4life commentedPardon me seems like my comment opened this ticket again.
Comment #20
lsolesen commented@pal4life. You should open a new issue.
Comment #21
pal4life commentedYes I will, please close this ticket, I do not think I can close it.
Comment #22
fenstrat@pal4life This issue is not closed, it is RTBC which means it is ready and waiting to be committed.
Comment #23
gabriele.genta commentedI had the same issue on Amazon EC2, patch #12 solves it. Thanks!
Comment #24
fenstratAnother report that the patch here in #12 solves this issue #1734936-2: Unable to send email when turned on.
Comment #25
basvredeling#12 works fine, hope this gets committed soon.
Comment #26
levelos commentedSorry for the delay gang, committed.
Comment #27
fenstratGreat to see this committed and the new 1.1 release. Thanks @levelos.