If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

\r\n is used in email to dictate header separations. Body should use only \n. Try removing \r\n and using just \n.
You don't need to email this text though like this. This may cause problems between html versus plaintext view. Write the data to a file, then email the file as an attachment.
Check if you have cron though, if you can crontab the backup, you are much better off using mysqldump for the export.

Users who have thanked Fou-Lu for this post:

Yeah totally agree, but its one of those basic packages with a lot of the neat features disabled. I use cronjobs myself, and I have started noticing that webhosts are clamping down on system, exec, and the other one.

this way it to make it simple for the user, for all cases and webhosts, push the big button and the work is done for you.

I hope they don't clamp down on mail()

if anyone wants the new code here is: (in this case I have used a sleep, and seems to correct the issue)