I really like this thread, I created something earlier to send emails with attachments in php. It backups a mysql database and then attaches it an email, you can set it up on a cron job to auto send the email everyday! It's a nice bit of code.
If anyone is interested see it here: http://www.thephpanswers.com/viewtop...11&t=8&start=0
consider using scp to copy your backup (securely!) after creating it. you can use authorized keys to pre-auth the user to transfer files and then you can run unattended backups without passing all the data through SMTP.
alternately, you can even create a UUID with php and email that (after creating a link file or saving the backup with the UUID as a filename) so the receiver of the email can directly download the file (but only if they have the UUID, once again it can be secure if you use secure email and https for the file tranfer, and the likelihood of someone "guessing" the filename to download it are ... slim)