How to send a file in an e-mail to a customer who has purchased a product?

Posts: 76
Joined: 09/19/2007
Bug FinderGetting busy with the Ubercode.

Is there any method that is being used to send a file to a customer via an e-mail attachment upon purchase?

Posts: 203
Joined: 09/06/2007

i create a pdf and attach it to an email for example! It is simple php in an hook_order call..

Posts: 332
Joined: 08/07/2007
Administrator

To get to the question, it is possible to do email attachments with PHP's mail function. Google "PHP email attachment" and you'll find plenty of examples. However, this isn't possible with Drupal's build in mailing function, drupal_mail. I was thinking about doing something like this a while back with the uc_file module, but I decided against due to people being able to forward the email and the size limitations email providers place on attachments. Keep that in mind if these files are supposed to be either exclusive or large.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Posts: 76
Joined: 09/19/2007
Bug FinderGetting busy with the Ubercode.

Thanks for your thoughts. I was hoping there was something in Drupal to do this, but it looks like there's nothing mature to handle programmatic mail attachments in a module yet.