The default file scheme for our website is private.

Using simplemail we want to send emails with images embedded that are located in the public folder. The html mail contains:

<img alt="Privacy &amp; Security" src="sites/default/files/image018.png" />

Does not work.

What I finally found out:

mimemail.inc, lines 192, 193:

    $public_path = file_default_scheme() . '://';
    $no_access = !user_access('send arbitrary files');

The user when called by simplemail is anonymous. The public path is "private://". That's wrong. My images are located in the public folder, not in the private one.

Workaround: Change user access so that anonymous can send arbitrary files.

CommentFileSizeAuthor
#1 mimemail-2413495-1.patch603 bytessgabe

Comments

sgabe’s picture

Status: Active » Needs review
StatusFileSize
new603 bytes

Patch attached.

Status: Needs review » Needs work

The last submitted patch, 1: mimemail-2413495-1.patch, failed testing.

sgabe’s picture

Status: Needs work » Fixed

  • sgabe committed ed10b61 on 7.x-1.x
    Issue #2413495 by sgabe, siggi_kid: Public images not embedded when file...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.