[NTLUG:Discuss] PHP revisited:need more info please

m m llliiilll at hotmail.com
Thu Feb 27 15:10:15 CST 2003


Yes, it works, I got this email from 'you', and this is is waht I want.
Thanks a lot.

by the way, I use qmail-inject, it works in this way, too.

>From: Jack Snodgrass <jack+ntlug at mylinuxguy.net>
>Reply-To: NTLUG Discussion List <discuss at ntlug.org>
>To: NTLUG Discussion List <discuss at ntlug.org>
>Subject: Re: [NTLUG:Discuss] PHP revisited:need more info please
>Date: 26 Feb 2003 20:31:32 -0600
>
><?
>$to_user      = "llliiilll at hotmail.com";
>$from_name    = "M M";
>$from_email   = "llliiilll at hotmail.com";
>$mailheaders .= "From: $from_name <$from_email>\n\n";
>$subject      = "test sent via php mail()";
>$msg_body     = "test message sent via php script.\n";
>$rc = mail($to_user, $subject, $msg_body, $mailheaders);
>?>
>
>works ( I think ) on my php box. My box uses postfix and just
>uses the sendmail front end. Not sure how the qmail thing
>would come into effect?
>
>jack
>
>
>On Wed, 2003-02-26 at 19:11, m m wrote:
> > I think i am not clear my question.
> >
> > the fouth is mail header, you can put from, body... there. and yes, you 
>can
> > be left off completely, but either way you will get the default sender's
> > email address (in other words, the receiver will see the sender's email
> > address)
> > I think my question is how do I send an email with from as an alias name
> > instead of email address by php mail (using qmail-inject)?
> >
> > thanks.
> >
> > >From: Paul Ingendorf <pauldy at wantek.net>
> > >Reply-To: NTLUG Discussion List <discuss at ntlug.org>
> > >To: NTLUG Discussion List <discuss at ntlug.org>
> > >Subject: Re: [NTLUG:Discuss] PHP revisited:need more info please
> > >Date: Mon, 24 Feb 2003 10:59:42 -0600 (CST)
> > >
> > >The fourth argument is for the mail header and can be left off 
>completely.
> > >In
> > >their infanite wisdom they decided there would be a to field a subject
> > >field
> > >and a body.  If you want to add anything else you must do it from the
> > >header on.
> > >
> > >
> > >If you are having problems with this I would suggest leaving the body 
>blank
> > >using the from field 2 newlines \n then begin your body from the header
> > >out.
> > >
> > >Quoting m m <llliiilll at hotmail.com>:
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > >From: Rob Apodaca <rob.apodaca at attbi.com>
> > > > >Reply-To: NTLUG Discussion List <discuss at ntlug.org>
> > > > >To: NTLUG Discussion List <discuss at ntlug.org>
> > > > >Subject: Re: [NTLUG:Discuss] PHP revisited:need more info please
> > > > >Date: Fri, 21 Feb 2003 22:16:50 -0500
> > > > >
> > > > >How about:
> > > > >
> > > > ><?
> > > > >function die_email ($mesg) {
> > > > >	$email = "yourself at wherever.com";
> > > > >	mail("$email", "Bad guys on web site", "$mesg", "$email");
> > > >
> > > > can I have the forth variable just a string only instead of email
> > > > address on
> > > > php3?
> > > > I have tried, no luck! it seems must be "From: xxx at xxx.xxx" format 
>not
> > > > just
> > > > any string.
> > > >
> > > > any have glue?
> > > >
> > > > thanks.
> > > >
> > > >
> > > > >	die ("$mesg");
> > > > >}
> > > > >
> > > > >foreach ($HTTP_GET_VARS as $secvalue) {
> > > > >      if (eregi("<[^>]*script*\"?[^>]*>", $secvalue)) {
> > > > >          die_email ("I don't like you...");
> > > > >      }
> > > > >}
> > > > >?>
> > > > >
> > > > >You could also put more useful information in the email like the ip
> > > > address
> > > > >of the offender which you could add to an htaccess file to deny 
>future
> > > >
> > > > >access to your site.
> > > > >
> > > > >Hope it helps
> > > > >Cheers,
> > > > >-rob
> > > > >
> > > > >_______________________________________________
> > > > >https://ntlug.org/mailman/listinfo/discuss
> > > >
> > > >
> > > > _________________________________________________________________
> > > > Tired of spam? Get advanced junk mail protection with MSN 8.
> > > > http://join.msn.com/?page=features/junkmail
> > > >
> > > >
> > > > _______________________________________________
> > > > https://ntlug.org/mailman/listinfo/discuss
> > > >
> > >
> > >
> > >
> > >--
> > >-->> mailto:pauldy at wantek.net
> > >-->> http://www.wantek.net/
> > >Running ....... Cos anything else would be a waste...
> > >`:::\'                  .......  ......
> > >  :::  *                  `::.    ::\'
> > >  ::: .::  .:.::.  .:: .::  `::. :\'
> > >  :::  ::   ::  ::  ::  ::    :::.
> > >  ::: .::. .::  ::.  `::::. .:\'  ::.
> > >:::.....................::\'   .::::..
> > >
> > >_______________________________________________
> > >https://ntlug.org/mailman/listinfo/discuss
> >
> >
> > _________________________________________________________________
> > STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> >
> >
> > _______________________________________________
> > https://ntlug.org/mailman/listinfo/discuss
>
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus




More information about the Discuss mailing list