I try to get this tutorial to work:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | function post_simple_message() {
$request =
new HttpRequest('https://api.mailgun.net/v2/samples.mailgun.org/messages',
HttpRequest::METH_POST);
$auth = base64_encode('api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0');
$request->setHeaders(array('Authorization' => 'Basic '.$auth));
$request
->setPostFields(array('from' => 'Excited User'.
' <Excited User <me@samples.mailgun.org>>',
'to' => 'sergeyo@profista.com, serobnic@mail.ru',
'subject' => 'Hello',
'text' => 'Testing some Mailgun awesomness!'
));
$request->send();
return $request;
}
|
Unfortunately that produces:
| Fatal error: Class 'HttpRequest' not found in index.php on line 2not found in index.php on line 2
|
As suggested here I tried adding a php.ini to my webapp containing:
| extension = php_http.dll
extension = pecl_http.dll
|
I also checked with phpinfo that my php.ini is parsed.
Any more ideas?
asked
Mar 03 '12 at 07:11
ampelmann
25●1●9