Get HTML string from URL

Viewed 501

here is my code to send an email:

$result = $client->sendEmail([
    'Message' => [
        'Body' => [
            'Html' => [
                'Data' => '<string>', // PUT HTML FILE HERE
            ],
            'Text' => [
                'Data' => '<string>',
            ],
        ]
    ]
]);

I have a template.php file which is the email template. i don't want to paste it in the html data because it is too long and it looks unorganized. how can i get the contents of http://www.example.com/template.php in the Html Data field using a link or url?

1 Answers
Related