http://i.stack.imgur.com/Iqy8a.png
我是这个程序的新手,我尝试搜索类似的问题,但我在本网站上找到的问题都是过时的问题。我加载到表单类型的代码文件中,我无法在设计视图中进行预览。
答案 0 :(得分:0)
按<?php
use Aws\Ses\SesClient;
require 'vendor/autoload.php';
if (isset($_POST['week'])) {
$to = $_POST['to'];
$from = "notifications@lambdachimemphis.com";
$subject = $_POST['subject'];
$monday = $_POST['M'];
$tuesday = $_POST['T'];
$wednesday = $_POST['W'];
$thursday = $_POST['R'];
$friday = $_POST['F'];
$saturday = $_POST['SAT'];
$sunday = $_POST['SUN'];
$notes = $_POST['notes'];
$message = file_get_contents('./week_email.html');
$message = str_replace('%Monday%', $monday, $message);
$message = str_replace('%Tuesday%', $tuesday, $message);
$message = str_replace('%Wednesday%', $wednesday, $message);
$message = str_replace('%Thursday%', $thursday, $message);
$message = str_replace('%Friday%', $friday, $message);
$message = str_replace('%Saturday%', $saturday, $message);
$message = str_replace('%Sunday%', $sunday, $message);
$message = str_replace('%Notes%', $notes, $message);
echo $message;
$client = SesClient::factory(array(
'key' => 'key',
'secret' => 'key',
'region' => 'us-east-1'
));
$emailSentId = $client->sendEmail(array(
// Source is required
'Source' => 'tes@test.com',
// Destination is required
'Destination' => array(
'ToAddresses' => array('test@aol.com')
),
// Message is required
'Message' => array(
// Subject is required
'Subject' => array(
// Data is required
'Data' => 'SES Testing',
'Charset' => 'UTF-8',
),
// Body is required
'Body' => array(
'Text' => array(
// Data is required
'Data' => 'My plain text email',
'Charset' => 'UTF-8',
),
'Html' => array(
// Data is required
'Data' => $message,
'Charset' => 'UTF-8',
),
),
),
'ReplyToAddresses' => array( 'test@test.com' ),
'ReturnPath' => 'test@test.com'
));
}
echo $emailSentId;
echo "fail";
显示设计视图。
OR
通过Shift-F7
显示解决方案资源管理器,然后在Ctrl-W,S
上双击