This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* PHP Example for Google Storage Up- and Download | |
* with Google APIs Client Library for PHP: | |
* https://github.com/google/google-api-php-client | |
*/ | |
include( "Google/Client.php" ); | |
include( "Google/Service/Storage.php" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { MAILGUN_API_KEY: apiKey, DOMAIN: domain, RECEIVER_MAIL: receiver_mail } = process.env | |
const mailgun = require('mailgun-js')({ apiKey, domain }) | |
exports.handler = function(event, context, callback) { | |
if(event.httpMethod!='POST' || !event.body){ | |
return callback(new Error('An error occurred!')) | |
} | |
const data = JSON.parse(event.body) |