Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #9994

PHP Mailto();

From Twayne <nobody@spamcop.net>
Newsgroups comp.lang.php
Subject PHP Mailto();
Date 2013-06-30 19:29 -0400
Organization Aioe.org NNTP Server
Message-ID <kqqf0l$7gm$1@speranza.aioe.org> (permalink)

Show all headers | View raw


Hi,

Win 7, PHP 5.3.5, XAMPP local server, standard Unix remote server:

having a problem with mailto. It's working fine, but ... I can't figure 
how to get it to contain all the information I want sent to me. I have 
the following:
=========================
$header = "From: abuse@hcs-classof64.net"; 	
$to = "abuse@hcs-classof64.net";
$subject = "HCS Abuse Form";
$header = "From: $name\r\n";
$header .= "Reply-To: abuse@hcs-classof64.net\r\n";
$header .= "Return-Path: abuse@hcs-classof64.net\r\n";

mail($to, $subject, $comments , $respond, $header);
========================
    And it seems to work fine. But what I'd like to add to the mailto is 
the following:
=======================
$browser = $_SERVER['HTTP_USER_AGENT'];
$ipAddress = $_SERVER['REMOTE_ADDR'];
=======================

I've tried the Headers method, simply adding them inlilne. No Good.
I've also tried "and"ing things together like " $comments . $respond " 
for instance, but then they all run together and it's difficult to spot 
the additional information since there are no line breaks.

For instance, in the mail I receive from the form, Id like to see, each 
on their own line with a blank line between is possible:
1. $comments which is the actua verbiage from the visitor,
2, New line,
3. $respond,
4. New line,
4. $ip,
5, New line,
6  $browser
besides the requisite Subject and From lines.
    Right now they're being echoed onscreen for my own purposes of 
testing, but either way I can't get it all into the form that's sent to 
me. I've been playing with this off & on for a week now and guess I need 
help!

Can anyone advise me how to accomplish my goal?

TIA,

Twayne`

Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

PHP Mailto(); Twayne <nobody@spamcop.net> - 2013-06-30 19:29 -0400
  Re: PHP Mailto(); "J.O. Aho" <user@example.net> - 2013-07-01 07:03 +0200
    Re: PHP Mailto(); The Natural Philosopher <tnp@invalid.invalid> - 2013-07-01 10:08 +0100
      Re: PHP Mailto(); Twayne <nobody@spamcop.net> - 2013-07-01 10:33 -0400
    Re: PHP Mailto(); Twayne <nobody@spamcop.net> - 2013-07-01 10:23 -0400
      Re: PHP Mailto(); Tim Streater <timstreater@greenbee.net> - 2013-07-01 16:28 +0100
  Re: PHP Mailto(); bill <william@TechServSys.com> - 2013-07-01 07:50 -0400
    Re: PHP Mailto(); The Natural Philosopher <tnp@invalid.invalid> - 2013-07-01 12:59 +0100
      Re: PHP Mailto(); "J.O. Aho" <user@example.net> - 2013-07-01 14:47 +0200
        Re: PHP Mailto(); The Natural Philosopher <tnp@invalid.invalid> - 2013-07-01 14:09 +0100
    Re: PHP Mailto(); Twayne <nobody@spamcop.net> - 2013-07-01 10:10 -0400
      Re: PHP Mailto(); Tim Streater <timstreater@greenbee.net> - 2013-07-01 16:34 +0100
        Re: PHP Mailto(); The Natural Philosopher <tnp@invalid.invalid> - 2013-07-01 16:58 +0100
          Re: PHP Mailto(); Tim Streater <timstreater@greenbee.net> - 2013-07-01 18:24 +0100
            Re: PHP Mailto(); The Natural Philosopher <tnp@invalid.invalid> - 2013-07-01 18:47 +0100
              Re: PHP Mailto(); Tim Streater <timstreater@greenbee.net> - 2013-07-01 20:43 +0100
        Re: PHP Mailto(); "J.O. Aho" <user@example.net> - 2013-07-01 19:05 +0200
          Re: PHP Mailto(); Christoph Michael Becker <cmbecker69@arcor.de> - 2013-07-01 19:21 +0200
            Re: PHP Mailto(); "J.O. Aho" <user@example.net> - 2013-07-01 19:30 +0200

csiph-web