I created an Elastic Email account yesterday. After receiving my confirmation email I pasted the API key into the appropriate field. I have double checked that my account email address and the API key are correct. When I view the status report page I have a green check box indicating that EE is used for sending site emails. However, when I click on the "Test" button I get the following error:

Failed. Reason: Error: no response (or empty response) received from Elastic Email service.

My recent log entries do not show any errors. Any ideas on how to start trouble shooting?

I am running:
Drupal 6.19
MySQL 5.0.91
PHP 5.2.14
Apache
Elastic Email 6.x-1.0

Comments

neilotoole’s picture

Hmmmn, that usually means that there's a problem with reaching the elastic email service. Let's see if we can manually hit it.

Execute the following from the command line of your web server (you need to have the 'curl' tool installed, and the command is all one line), substituting appropriate values for username (your elastic email account), api_key, and the 'from' and 'to' fields. Note that you must supply url-encoded values, so if your email is 'me@acme.com', the necessary value is 'me%40acme.com'.

curl '-dusername=account%40acme.com&api_key=555a5555-c613-40e1-a1f7-90bd876f04c2&from=me%40acme.com&to=me%40acme.com&subject=Elastic+Email+test&body_text=This+is+a+test.' https://api.elasticemail.com/mailer/send

If successful, you should get a response like:

55b5b55f-e476-4743-96fc-4047d4f5d59e1

Please let me know what response (if any) you get.

Archnemysis’s picture

Sorry for the delayed response. I am still waiting to get ssh access to my server. On my local machine I do get a valid response from EE but I have not tested on the server yet. - jt

Archnemysis’s picture

Posted too soon. I was able to successfully reach EE using curl on the server. This was the response:

e83bddbe-5762-4af0-a436-4381473a49ac

When I open the EE control panel, the test registers as a success and I receive the test emails.

Archnemysis’s picture

I disabled all contrib modules and optional core modules, as well as set the theme to Garland. I still get this error, so i am thinking it has something to do with my server set up?

neilotoole’s picture

@Arch: Well, this is a bit of a mystery. Let's see if we can figure it out.

>> When I open the EE control panel, the test registers as a success and I receive the test emails.

>> I disabled all contrib modules and optional core modules, as well as set the theme to Garland. I still get this error [...]

I'm a little confused here. Are you or are you not seeing an error when you hit the "Test" button in the EE config screen?

Archnemysis’s picture

Sorry, the successful test emails were from when I hit the EE api manually via curl. I have not been able to get the EE module to send emails from Drupal yet.

I installed EE on a test site on my server to see if I could get it to work, but no luck. I tried with a plain vanilla drupal setup and I get the empty response error when I hit test, or when the site is supposed to send an email. For example, I enabled the Job Queue module and checked the appropriate option on the EE module configuration. Then I logged out and did a password request. After logging in and running cron, the empty response error message appears in the syslog and no emails were registered via the EE website.

Archnemysis’s picture

Found the problem! My PHP config (?q=admin/reports/status/php) had allow_url_fopen turned off. Updating my PHP5.INI file to include allow_url_fopen = on fixed the problem. I am not sure if that particular PHP function is normally turned off, or was just unique to my shared hosting provider. Regardless, it is functioning now.

Thanks for your patience Neil. Perhaps adding some type of test to check for this is in order?

neilotoole’s picture

Status: Active » Needs work

@Arch, I believe that option is usually on by default. That said, I'll add a test for it.

neilotoole’s picture

Assigned: Unassigned » neilotoole

  • Commit d25b4aa on 6.x-1.x by mike.davis:
    Issue #995640 by mike.davis: fix for no response (or empty response)...
mike.davis’s picture

Issue summary: View changes

I have updated the admin screen to show a warning message when the 'allow_url_fopen' is not enabled to warn administrators.

mike.davis’s picture

Assigned: neilotoole » mike.davis
Status: Needs work » Fixed

Updated status

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.