I'm trying to send email with attachments using HTML Mail.

example:

$params['attachments'][] = array(
            'filecontent' => file_get_contents(drupal_realpath($file)),
            'filemime' => '$filemime,
            'filename' => $filename,
            'list' => true,
);

$result = drupal_mail('module', 'test', $to, user_preferred_language($user), $params, $from, true);

The mail comes without attachments, and I don't found any information how to add them neither in the module's docs nor in www.

All solutions proposed in The Network are using 3rd party classes or modules like MailMime, which not supports HTML Mail messages templating: it doesn't react on htmlmail.tpl.php changes, so seems they can't work together.

May you include a chapter about working with attachments to HTML Mail documentation?

I highly appreciate if you update me immideately with the problem's solution.

Comments

metallized’s picture

Component: Documentation » Code
Category: Support request » Bug report
Priority: Normal » Critical

Hi this issue is a bug report.

No one seems to interest about this.

Please if you know about a module for replace this i would like to know it.

I will NOT continue to use this module until it is corrected this bug.

Thanks

salvis’s picture

Component: Code » Documentation
Category: Bug report » Support request
Priority: Critical » Normal

I will NOT continue to use this module until it is corrected this bug.

It's a deal. ;-)

In the meantime feel free to post a patch with a fix (against the -dev version).

Actually, this sounds more like a support or feature request. Unfortunately, I don't have an answer, but there are quite a few sites using this module, apparently with success...

metallized’s picture

Hi, i find and implements the Mime Mail Module and works like a charm, even allow create template files like this one.

I don't think sending attachments on mails it is a "support or feature request".

Nevermind, good luck with this project is nice except when you send a mail with attachments.

salvis’s picture

Status: Active » Closed (outdated)