Reply và return path đặt trong headers như sau:
$headers = 'From: sample@example.com' . "\r\n" . 'Reply-To: sample@example.com' . "\r\n" . 'Return-Path: sample@example.com'
Hoặc truyền làm tham số thứ năm để thay đổi return path:
mail($to, $subject, $message, $headers, "-f email@wherever.com");
Ở đây, 'email@wherever.com' phải thay bằng email thực của user.