Created
July 7, 2014 22:06
-
-
Save mattsandersuk/e6aa957aff95e6b78f57 to your computer and use it in GitHub Desktop.
Automatically populate email body with user agent string in mailto link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$support_email = "[email protected]"; | |
$browser = $_SERVER['HTTP_USER_AGENT']; | |
$email_subject = "Some email subject..."; | |
$email_body = "<i>write message here</i><br><br><b>Please Keep</b> <br>" . $browser; | |
?> | |
<a href="mailto:<?php echo $support_email; ?>?subject=<?php echo $email_subject; ?>&body=<?php echo $email_body; ?>">Email Support</a></li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment