Date in Subject of Email

Post your support requests/solutions for phpMySQLAutoBackup [website]
Alk
Working towards guru status...
Working towards guru status...
Posts: 5
Joined: Wed Dec 14, 2005 1:51 am
Contact:

Date in Subject of Email

Postby Alk » Wed Dec 14, 2005 1:55 am

Hi
Is there anyway that the date of the backup can be included in the subject of the email sent?

Also, this is off-topic, but is there anyway to subscribe to a mailing list to recieve updates on this script? can I subscribe to this forum and get the notifications via the forum? It doesn't seem to be enabled to do so. :cry:
Thanks!

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Dec 14, 2005 3:38 pm

Hi Alan, and Welcome,

This should be already included in the subject.

However, you can easily change it, just edit:
phpmysqlautobackup.php

line: 35

change the second parameter:
"phpMySQLAutoBackup: $backup_file_name"

All the best

Dave

Alk
Working towards guru status...
Working towards guru status...
Posts: 5
Joined: Wed Dec 14, 2005 1:51 am
Contact:

Postby Alk » Wed Dec 14, 2005 3:55 pm

Thank you David.

Is there anyway to have it like this?

xmail ($emailaddress, "%d %b %Y %H %M %S Backup", $dump_buffer, $backup_file_name);

I hope by that example you will understand what I mean. I see that the filename does have the date in it, which is then included in the email subject, however, it isn't in a particularly easy format. What I would like is the subject of the email to say:

14 Dec 2005 Backup

I hope that makes sense. Thanks! :)

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Dec 14, 2005 4:12 pm

Yes, replace this:
xmail ($emailaddress, "%d %b %Y %H %M %S Backup", $dump_buffer, $backup_file_name);

With:
$thesubject = "Date: ".date("d m Y").", Time: ".date("H.i.s")." - Backup";
xmail ($emailaddress, $thesubject, $dump_buffer, $backup_file_name);

For more info on PHP date formatting see:
http://uk.php.net/manual/en/function.date.php

Cheers

Dave

Alk
Working towards guru status...
Working towards guru status...
Posts: 5
Joined: Wed Dec 14, 2005 1:51 am
Contact:

Excellent

Postby Alk » Wed Dec 14, 2005 5:35 pm

Fantastic! Thanks very much David, it's worked!

Now, is there anyway to subscribe to a mailing list to recieve updates on this script? can I subscribe to this forum and get the notifications via the forum? It doesn't seem to be enabled to do so. :(

Thanks again

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1810
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Postby davidgwalker » Wed Dec 14, 2005 6:00 pm

Great.

So long as you keep your email address updated within the forum Profile above, then you will receive an email when I release an update to any of my apps.

All the best

Dave


Return to “phpMySQLAutoBackup [forum]”

Who is online

Users browsing this forum: No registered users and 3 guests