You're right about the need to get the standard form to function correctly first.
I'll grab the latest version of CMS-XHm, try it out and report back
![Smile :)](./images/smilies/icon_e_smile.gif)
Cheers
Moderator: Tata
Code: Select all
<?php
$yourMail = 'webmaster@example.com';
$senderMail = 'user@example.com';
$ok = mail($yourMail, 'First Test', 'First Test');
echo $ok ? 'First Mail sent' : 'First Mail NOT sent', '<br>';
$ok = mail($yourMail, 'Second Test', 'Second Test', 'From: ' . $senderMail);
echo $ok ? 'Second Mail sent' : 'Second Mail NOT sent', '<br>';
As there was only 1 additional header, everything should be fine.Multiple extra headers should be separated with a CRLF (\r\n).
Code: Select all
<?php
$yourMail = 'webmaster@example.com';
$senderMail = 'user@example.com';
$ok = mail($yourMail, 'Test', 'Test', 'From: ' . $senderMail . "\r\n");
echo $ok ? 'Mail sent' : 'Mail NOT sent', '<br>';
Code: Select all
To: webmaster@example.com
Subject: Test
From: user@example.com
Test
Code: Select all
ini_set("sendmail_from", "webmaster@host.com");
Code: Select all
<?php
ini_set("sendmail_from", "webmaster@host.com");
$yourMail = 'webmaster@host.com';
$senderMail = 'anyemail@test.com';
$ok = mail($yourMail, 'Test', 'Test', 'From: ' . $senderMail . "\r\n");
echo $ok ? 'Mail sent' : 'Mail NOT sent', '<br>';
?>
Code: Select all
if ($action == 'send')
{ // this is already here; add the following line:
ini_set('sendmail_from', stsl($sender));
Code: Select all
if ($action == 'send')
{
$msg = $tx['mailform']['sendername'] . ": "
. stsl($sendername) . "\n"
. $tx['mailform']['senderphone'] . ": "
. stsl($senderphone) . "\n\n" . stsl($mailform);
Code: Select all
if ($action == 'send')
{
ini_set('sendmail_from', stsl($sender));
$msg = $tx['mailform']['sendername'] . ": "
. stsl($sendername) . "\n"
. $tx['mailform']['senderphone'] . ": "
. stsl($senderphone) . "\n\n" . stsl($mailform);