[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Binary Email Attachments
****** message to minivend-users from "Cameron B. Prince" <info@InternetExpertsLLC.com> ******
Hi list,
I have created a new Minivend function for backing up my databases. I use a form with checkboxes for each database. When the form is submitted, the selected databases are exported to text files, then tarred and gzipped into one file.
I want to then email the backup file to the __ORDERS_TO__ address.
I have the following code and it's partially working:
[set name=backup_sent interpolate=1]
[perl arg=sub interpolate=1]
form_mail
(
q{__ORDERS_TO__},
q{IE - Database Backup},
q{info@InternetExpertsLLC.com},
<<'EOMail' )
[tag mime type TEXT/PLAIN; CHARSET=US-ASCII][/tag]
[tag mime New Backup]
FILENAME: IELLC_DB_BU_[tag op=time]%m-%d-%y[/tag].tar.gz
[/tag]
[tag op=mime
interpolate=1
type="application/octet-stream"
description="IELLC_DB_BU_[tag op=time]%m-%d-%y[/tag].tar.gz"]
[include file="pages/BACKUP/IELLC_DB_BU_[tag op=time]%m-%d-%y[/tag].tar.gz"]
[/tag]
[/if]
EOMail
[/perl]
[/set]
The problem is the message is not being encoded properly and my email clients aren't recognizing the attachment.
Here's what I am getting:
---ywmrcien-5:=13225
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <MiniVend.4.04.000614125210.ywmrcien.6@http://www.InternetExpertsLLC.com/index.cgi>
Content-Description: New Backup
FILENAME: IELLC_DB_BU_06-14-00.tar.gz
---ywmrcien-5:=13225
Content-Type: application/octet-stream
Content-ID: <MiniVend.4.04.000614125210.ywmrcien.7@http://www.InternetExpertsLLC.com/index.cgi>
Content-Description: IELLC_DB_BU_06-14-00.tar.gz
[TAR FILE HERE]
I believe the mime header should look more like this:
Content-Type: application/octet-stream;
name="IELLC_DB_BU_06-14-00.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="IELLC_DB_BU_06-14-00.tar.gz"
But I am not sure how to make Minivend do this. I am also having trouble understanding what mime boundary, mime header, and mime heder (mime id rather) do.
Anyone have any hints?
Thanks,
Cameron
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list