Skip to content

Commit

Permalink
GitHub issue #2 retrieve remote URL
Browse files Browse the repository at this point in the history
  • Loading branch information
bramley committed Oct 5, 2014
1 parent 8c0f459 commit 64b9590
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions plugins/ViewBrowserPlugin.php
Expand Up @@ -342,12 +342,21 @@ public function createEmail($mid, $uid)
}

$message = loadMessageData($mid);
$content = $message['message'];
$template = $row['template'];

if ($template) {
$template = str_replace('\"', '"', $template);
$content = str_ireplace('[CONTENT]', $content, $template);
if ($message['sendmethod'] == 'remoteurl') {
$content = fetchUrl($message['sendurl'], $user);

if (!$content) {
return "Unable to retrieve URL {$message['sendurl']}";
}
} else {
$content = $message['message'];
$template = $row['template'];

if ($template) {
$template = str_replace('\"', '"', $template);
$content = str_ireplace('[CONTENT]', $content, $template);
}
}
$content = $this->replaceFooter($content, $message['footer']);
$content = $this->replaceSignature($content, EMAILTEXTCREDITS ? $PoweredByText : $PoweredByImage);
Expand Down

0 comments on commit 64b9590

Please sign in to comment.