From 165e128b508f560c5a3dce73070aae7a788566c1 Mon Sep 17 00:00:00 2001 From: Laurent Marquet <16478286+LaurentMarquet@users.noreply.github.com> Date: Mon, 15 Jul 2019 16:54:29 +0200 Subject: [PATCH] Add attachment with url Without this we may think (as I did until I tested) that it can only work with a file path and not with url --- mailer.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mailer.rst b/mailer.rst index 3b83c5454ec..8fb939ed592 100644 --- a/mailer.rst +++ b/mailer.rst @@ -200,6 +200,8 @@ Use the ``attachFromPath()`` method to attach files that exist on your file syst ->attachFromPath('/path/to/documents/privacy.pdf', 'Privacy Policy') // optionally you can provide an explicit MIME type (otherwise it's guessed) ->attachFromPath('/path/to/documents/contract.doc', 'Contract', 'application/msword') + // you can also use an absolute url + ->attachFromPath('http://example.com/path/to/documents/contract.doc', 'Contract', 'application/msword') ; Alternatively you can use the ``attach()`` method to attach contents from a stream::