@@ -199,6 +199,11 @@ public function run($username, $rcptCount)
199
199
protected function _logMessage ($ throttleId , $ username , $ rcptCount , $ status )
200
200
{
201
201
$ headerArr = $ this ->getParsedHeaderArr ();
202
+ $ from = mb_decode_mimeheader ($ headerArr ['from ' ] ?? null );
203
+ $ to = mb_decode_mimeheader ($ headerArr ['to ' ] ?? null );
204
+ $ cc = mb_decode_mimeheader ($ headerArr ['cc ' ] ?? null );
205
+ $ bcc = mb_decode_mimeheader ($ headerArr ['bcc ' ] ?? null );
206
+ $ subject = mb_decode_mimeheader ($ headerArr ['subject ' ] ?? null );
202
207
203
208
$ sql = 'INSERT INTO messages (throttle_id, username, uid, gid, rcpt_count, status, msgid, from_addr, to_addr,
204
209
cc_addr, bcc_addr, subject, site, client, script)
@@ -212,11 +217,11 @@ protected function _logMessage($throttleId, $username, $rcptCount, $status)
212
217
$ stmt ->bindParam (':rcptCount ' , $ rcptCount );
213
218
$ stmt ->bindParam (':status ' , $ status );
214
219
$ stmt ->bindParam (':msgid ' , $ headerArr ['x-meta-msgid ' ]);
215
- $ stmt ->bindParam (':fromAddr ' , mb_decode_mimeheader ( $ headerArr [ ' from ' ]) );
216
- $ stmt ->bindParam (':toAddr ' , mb_decode_mimeheader ( $ headerArr [ ' to ' ]) );
217
- $ stmt ->bindParam (':ccAddr ' , mb_decode_mimeheader ( $ headerArr [ ' cc ' ]) );
218
- $ stmt ->bindParam (':bccAddr ' , mb_decode_mimeheader ( $ headerArr [ ' bcc ' ]) );
219
- $ stmt ->bindParam (':subject ' , mb_decode_mimeheader ( $ headerArr [ ' subject ' ]) );
220
+ $ stmt ->bindParam (':fromAddr ' , $ from );
221
+ $ stmt ->bindParam (':toAddr ' , $ to );
222
+ $ stmt ->bindParam (':ccAddr ' , $ cc );
223
+ $ stmt ->bindParam (':bccAddr ' , $ bcc );
224
+ $ stmt ->bindParam (':subject ' , $ subject );
220
225
$ stmt ->bindParam (':site ' , $ headerArr ['x-meta-site ' ]);
221
226
$ stmt ->bindParam (':client ' , $ headerArr ['x-meta-client ' ]);
222
227
$ stmt ->bindParam (':script ' , $ headerArr ['x-meta-script ' ]);
0 commit comments