Closed rezzz-dev closed 13 years ago
Thanks for your report. Can you please post a bit of your code when this error occurs? Does your error log show anything abnormal and did you try to enable debug mode? $this->amazon_ses->debug();
This is the code I have in there - I took out the emails so I don't get slammed with garbage.
$to = 'email@domain.com';
$body = "Just a reminder that you have an appointment tomorrow";
$this->amazon_ses->debug();
$this->amazon_ses->from('(validemail)','(validName)');
$this->amazon_ses->to($to);
$this->amazon_ses->message($body);
$this->amazon_ses->send();
I even looked in the apache error logs and nothing shows up, which I find really strange. I do appreciate any help, thanks @joelcox
Hmm, that should work okay. What happens when you var_dump($this->amazon_ses->send());
Hmmm -- Phil said that he made some changes to his library but intro'd a bug and hasn't fixed it - so I'm not sure if it's his issue now or not. Do you have the Curl.php lib that works with it?
I'm using the version on GetSparks.org, which is tagged as v1.0 on GitHub. https://github.com/philsturgeon/codeigniter-curl/tree/1.0. Please let me know if using this version resolves your problem.
Nope - I get nothing now - ugh - don't understand this - I don't see anything in error log or anything - just a 200 in access
Could you post the content of your CodeIgniter logs? (http://codeigniter.com/user_guide/general/errors.html)
When I do a var_dump($this->amazon_ses->send()) - I get bool(false)
I just turned on the error logging and but no log file was created - I think it's because it's actually returning false from the send - not sure why though - where does the debug() drop the info for the SES lib?
Ok -- I've got the error finally :) Peer certificate cannot be authenticated with known CA certificates
I even went into your lib and pulled out the https to just use http - but then I get couldn't connect to host
Now what's the deal there? -- It's the same thing that I've been using on the command line scripts. Any thoughts?
@joelcox - not sure if this is good or not - but I changed the VERIFYPEER from TRUE to FALSE in the Curl.php lib, but now it's sending and working
I'd love to hear your thoughts on that - thanks again
@rezzz-dev Most PHP/cURL libs can't access SSL certificates installed on the system. This makes it impossible to check whether a connection to SES has been compromised. Since you're sending email addresses over the internet, I made a secured connection mandatory. You can specify the location of these certificates using
$config['amazon_ses_cert_path'] = 'location/to/certs.pem';
I will add an extra check for this in the library so it will warn you instead of fail bluntly. Sorry for your experience!
This is related to Issue 1
It's totally all good, no sweat. Thanks for all your effort!! I put the location in there just as you state in the config, but still was getting that issue. No clue as to why it maybe wasn't finding it, perms? So what I did was copied the cert into the config dir, changed the perms on it to 777 and still got that error. So instead I just changed the value for verifying in the curl lib to false. Not the best thing I know, but it works for the time being :).
Hmm, the file only has to be readable. What certificate did you use? I recommend this one: http://www.cs.fsu.edu/~engelen/soapcacerts.html
I updated the source to include the check in commit 5f7237815e39c2c76267. Could you get back to my previous message?
I was using my AWS cert - it did work once I got Phil's lib working - thanks so much
Not sure if this should be posted here or on Phil's but I seem to be getting this error when trying to run this.
A PHP Error was encountered
Severity: Warning
Message: curl_close(): supplied argument is not a valid cURL handle resource
Filename: libraries/Curl.php
Line Number: 312
Not sure what to do, would appreciate any help that you can give, thanks