我试图通过mailchimp api 3.0版在php中发送电子邮件,但我没有运气.这是我的代码:
$postString = '{
"message": {
"html": "this is the emails html content",
"text": "this is the emails text content",
"subject": "this is the subject",
"from_email": "xxx@dyyy.sk",
"from_name": "John",
"to_email": "aaa.bbb@gmail.com",
"to_name": "Anton",
"track_opens": false,
"track_clicks": false
}}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->api_endpoint);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, 'drewm:'.$this->api_key);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/vnd.api+json', 'Content-Type: application/vnd.api+json'));
curl_setopt($ch, CURLOPT_USERAGENT, 'DrewM/MailChimp-API/3.0 (github.com/drewm/mailchimp-api)');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, …Run Code Online (Sandbox Code Playgroud) 我正在使用:https : //github.com/aws-amplify/amplify-js
是否有任何工作示例如何使用经过身份验证的 AWS 访问?我正在使用这个:
Amplify.configure({
Auth: {
identityPoolId: configs.broker.identityPoolId,
region: configs.broker.aws_pubsub_region,
userPoolId: configs.broker.userPoolId,
userPoolWebClientId: configs.broker.userPoolWebClientId,
}
});
Amplify.addPluggable(new AWSIoTProvider(configs.broker));
Auth.signIn(configs.broker.username, configs.broker.password)
.then(user => {
resolve({ code: 200, message: 'Authorized access to AWS is used' })
})
.catch(singInErr => resolve({ code: 500, message: singInErr.message }));
Run Code Online (Sandbox Code Playgroud)
如果没问题(没问题):
PubSub.publish(configs.broker.topic, JSON.stringify(data))
.then(res => resolve({
code: 200,
message: 'OK'
}))
.catch(err => resolve({
code: 500,
message: err.toString()
}));
Run Code Online (Sandbox Code Playgroud)
但我不断得到:
[未处理的承诺拒绝:NotAuthorizedException:此身份池不支持未经身份验证的访问。]
如何更改easyadminbundle的日期时间选择器使用的默认格式?
我知道我必须config.yml在字段属性的type_options中更改一些内容.或者设置一些不同的日期时间格式.但是如何或在哪里?
symfony ×2
aws-amplify ×1
cognito ×1
email ×1
forms ×1
json ×1
mailchimp ×1
php ×1
react-native ×1
send ×1