Re: Newbie question about sending email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Brown has written on 4/16/2008 4:04 PM:
On Wed, Apr 16, 2008 at 3:53 PM, Pete Holsberg <pjh42@xxxxxxxxx> wrote:
I wanted a form for people in my community to use to subscribe to a yahoo
group that I run.

 Not being a PHP programmer, I created the form with phpFormGenerator from
SourceForge.

 It works fine except that the email that gets sent to yahoo appears to come
from my web host's domain!

 How can I change things so that the email appears to come from the email
address that is entered in the form?

    Make sure that the From:, Reply-To:, and Return-Path: headers are
correctly set in the form processing code, that the headers in general
are properly constructed, and that your host allows aliased sending by
configuration (some MTA configurations only allow a single address, to
reduce SPAM and such).

The entire processor.php file is:

<?php

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));

mail("4sam-nj-subscribe@xxxxxxxxxxxxxxx,pjh42@xxxxxxxxx","SUBSCRIBE","Form data:

Name: " . $_POST['field_1'] . "
Street Address: " . $_POST['field_2'] . "
Phone Number: " . $_POST['field_3'] . "
Email Address: " . $_POST['field_4'] . "


powered by phpFormGenerator.
");

include("confirm.html");

?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux