sendmail - PHP mail body construct -
i can't seem join (concatenate) these fields correctly. using mail api 3rd party end , can't change fields. add new fields need add them comments section. want add
log in id ($loginid) $internal=$_server['server_addr']; $hostname = gethostbyaddr($_server['remote_addr']);
to comments field $inquiry = $_post['textfield'] ;
i need format follows in generated email:
log in - xyz
host name - xxxx
internal ip - xxx
comments - a;ldkjfalkdjf
currently have following code, when joined returns nothing
$loginid = $_post['loginid'] ; $internal=$_server['server_addr']; $hostname = gethostbyaddr($_server['remote_addr']); $inquiry = $_post['$loginid' . '$internal' . '$hostname' . 'textfield'] ; mail( "email@email.com", "subject", "$inquiry" "from: $email");
how can group desired data , format better in return email? thx!
$inquiry = $_post['$loginid' . '$internal' . '$hostname' . 'textfield'] ;
that line looks wrong. think mean:
$inquiry = $_post['loginid'] . $internal . $hostname . $_post['textfield'] ;
or format said:
$inquiry = 'log in - '.$_post['loginid'].php_eol; $inquiry .= 'host name - '.$hostname.php_eol; $inquiry .= 'internal ip - '.$internal.php_eol; $inquiry .= 'comments - : '.$_post['textfield'].php_eol;
Comments
Post a Comment