PDA

View Full Version : Incorrect header time in emails


SloppyGoat
09-21-2003, 08:21 PM
Ok, this probably doesn't bother anyone, and it really never bothered me...until someone pointed it out, and me and this other guy started trying to figure out how to fix it.
If you've never noticed, vB's email header time is off by 11 hours because it doesn't send time headers, period.
Well, Squirre1, over at vB.com figured out a fix for this, but it only works for versions before 2.3.x. So, I've been trying to figure out how to do this on 2.3.0.

You can read this thread for the background on this problem.
http://www.vbulletin.com/forum/showthread.php?t=23057&page=1&pp=15

Here's what I've found out, from what Squirrel1 has helped me with.

Ok, here's what we've found out so far. Maybe this will help someone to help me figure out what's going on here.

What I've found out is; if I change this line in functions.php...

vbmail($toemail, $subject, $message, $from = '', $headers = '', $username = '') {

to:

vbmail($toemail, $subject, $message, $from = '', $headers = '\nDate: $emailtime', $username = '') {

....then the correct header time is sent on subscribed thread emails, but not on regular emails. But, it also includes the variable ($emailtime) at the top of the message. The global.php's don't seem to make any difference at all. I tried replacing them with the originals one at a time, so it's definitely the funcions.php that's putting the "$emailtime" at the top of the message. Can anyone help figure out:

1) How to make functions.php send the correct header time, but not include the variable in the message

2) How to make the correct header time send in all emails, not just subscribed thread notices.

Any help would be much appreciated, since I'm no php guru.

Dean C
09-22-2003, 10:02 AM
If you believe it's wrong in every board you should report it as a bug at vbulletin.com :)

SloppyGoat
09-22-2003, 01:09 PM
Well, since vB doesn't send header time at all, it's not really a bug, just an exclusion. They already know about it, and Mike Sullivan says it's just not in the code. It probably should be though, eh? It's wrong on every board that doesn't use sendmail, I guess.

vB doesn't send anything time related to sendmail whatsoever. Normally, I would think that sendmail sends based on the server time, but that doesn't seem to be the case here for some reason...

($toemail,$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

There's no date header send whatsoever.

(This is older code. Since the version they were discussing, it appears to have been consolidated in functions.php)