1

I have l5.2 and I followed this steps in hooking sparkpost and laravel and I reverted my services and mail.php to its original configuration:

https://medium.com/@petehouston/send-mail-with-sparkpost-in-laravel-b5e30a941ebf#.s2hebpwb6

But I get this error:

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Right leg
  • 16,080
  • 7
  • 48
  • 81
TheBAST
  • 2,680
  • 10
  • 40
  • 68
  • You may need to install a certificate on your local machine. Please check the answers here: http://stackoverflow.com/questions/29822686/curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate – EddyTheDove Jan 17 '17 at 03:29
  • Yeah i'm on it after I've seen a related question. Thanks anyways – TheBAST Jan 17 '17 at 03:29
  • Now i'm done with that. there's another error can you p lease help me ? – TheBAST Jan 17 '17 at 03:32
  • Client error: `POST https://api.sparkpost.com/api/v1/transmissions` resulted in a `400 Bad Request` response: { "errors": [ { "message": "Invalid domain", "description": "Unconfigured Sending Domain ", "code": "7001" (truncated...) – TheBAST Jan 17 '17 at 03:32
  • Oh yeah. It happens all the time. So with Parkpost, you have to add your sending domains. E.g: Let's say you send emails from 'sand.com'. You need to login to your sparkpost dashboard and add 'sand.com' to your sending domains. Make sure you have ownership of the domain as they will ask to verify the domain. – EddyTheDove Jan 17 '17 at 03:40
  • @A.Sand are you using xampp by any chance or something related? – Birdy Jan 17 '17 at 03:47
  • I don't own any domain yet for now. This is just for local development – TheBAST Jan 17 '17 at 05:09
  • Can I still use sparkpost for just local deployment (Localhost) – TheBAST Jan 17 '17 at 05:09

1 Answers1

0

This is a problem with your local cacert and usually occurs when using xampp, wamp or similar related software because when making default curl requests there is no certificate in place.

My suggestion would be to download a cacert from here: http://curl.haxx.se/ca/cacert.pem

Copy the cert to C:\Xampp\certs

Update your PHP.ini file with:

curl.cainfo="C:/xampp/certs/ca-bundle.crt"
openssl.cafile="C:/xampp/certs/ca-bundle.crt"

Restart your web server and you should be good to go.

Birdy
  • 775
  • 1
  • 6
  • 21