I use Laravel 4 framework with AWS sdk for SES. I am able to send regular emails using sendEmail function. I want to be able to attach files to the emails, the problem is that I can't find how to do it.
is it even possible to use sendEmail function to attach files or I must use send_raw_email function? (how to do this?)
this how I use SES:
$msg['Source'] = Config::get('mail.mailSource');
$msg['Destination']['ToAddresses'][] = $_GET['email'];
$msg['Message']['Subject']['Data'] = "bla bla";
$msg['Message']['Body']['Text']['Data'] = 'bla bla';
$msg['Message']['Body']['Html']['Data'] = 'bla bla';
$ses = AWS::get('ses');
$ses->sendEmail($msg);
I looked at AWS sdk in laravel and found there array with requirements for sendEmail function but there are no clues for attach files
'SendEmail' => array(
'httpMethod' => 'POST',
'uri' => '/',
'class' => 'Aws\Common\Command\QueryCommand',
'responseClass' => 'SendEmailResponse',
'responseType' => 'model',
'parameters' => array(
'Action' => array(
'static' => true,
'location' => 'aws.query',
'default' => 'SendEmail',
),
'Version' => array(......
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…