HTTP_USER_AGENT in email

the mail() function

Moderators: macek, egami, gesf

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Wed Jul 16, 2003 9:59 am

Assuming you're using the mail() function, just include $_SERVER['HTTP_USER_AGENT'] in the text you're sending. Like so:

Code: Select all

<?
   $recipient = 'swirlee@php-forum.com';
   $subject = 'This e-mail is spam';
   $message = 'The sender\'s HTTP_USER_AGENT is: ' . $_SERVER['HTTP_USER_AGENT'];
   mail($recipient, $subject, $message);
?>

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron