After spending some time wading through the various debates about HTML Mail/Mail System/SMTP vs. MimeMail, PHPMailer, etc., I prefer the architecture and vision of HTML Mail. Your approach seems more object-oriented, flexible and maintainable. However, I'm having trouble figuring out how to add a file attachment to an email in cases where the attachment is something other than an image embedded in the email.
Your document states that embedded images will be automatically converted into MIME attachments. However, I want to add a PDF document as an attachment to accompany the text of the message. My use case is a job application website where applicants are asked to upload their resumes, which are then emailed to potential employers. Can you explain how to do this?
Comment | File | Size | Author |
---|---|---|---|
#2 | html-mail-attachments-1341772.patch | 1.48 KB | neochief |
|
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedNoted.
You could do this with MailMIME but it certainly could be easier. Will try to work this into the rewrite.
See #1333310: Rewrite and fork PEAR classes instead of subclassing.
Comment #2
neochief CreditAttribution: neochief commentedHere's the patch for attachements. Tested with webform attachments, works like a charm.
Comment #3
hansfn CreditAttribution: hansfn commentedI'm the Views Send developer and I have requests for adding support for HTML Mail. To my surprise HTML Mail didn't support attachments. After some searching I found this issue with a patch from 2012 - that still works perfectly! Please commit.
Probably other people need further support for attachments, but this is a nice good start.
Comment #4
OleksiyThanks for the patch. It works! Would be great to see it committed.
Comment #6
salvisOk, thank you neochief, hansfn, and Oleksiy!
Comment #8
thomasmurphy CreditAttribution: thomasmurphy as a volunteer commentedI've downloaded the dev version which has this patch applied to it, thanks.
It doesn't seem like it creates any additional UI, how does it work? I'm trying to attach a file to an email where the file URL is available as a rules variable.
Comment #9
pribeh CreditAttribution: pribeh commentedBumping @thomasmurphy's request. Anybody have any tips?
Comment #10
salvisPlease open a new support request.