PDA

View Full Version : PHP3@futurequest.net mail address


SneakyDave
06-30-1999, 09:25 PM
Is this the new mail address name that is sent out on any new email messages created with PHP? Just want to make sure, I don't think I've seen it before, and I hope I don't have something screwed up.

I thought you could specify a "reply to" address, but maybe I'm missing something.

Thanks for your time

Sneaky

Terra
06-30-1999, 10:58 PM
SIX was the only server to have the updated default PHP email address as the configurations (3rd Generation) were built with that in mind...[nbsp][nbsp]Domains on TAZ (1st & 2nd Generation configs) utilize the PHP3@FutureQuest.net - which will subsequently bounce to nowhere land...

I'm sure Justin has the magical incantation to pass for PHP3 on changing this... ;)

--
Terra
--PHP3 is not my native language (yet) - wanna talk Perl?--
FutureQuest

Justin
07-01-1999, 12:10 AM
The last parameter of mail() is where you can insert any headers you need to:

mail (to, subject, message, headers);

So you can do this:

mail ("blah@hostfacts.com", "This is NOT SPAM", "Hi,
We thought you might be interested in this offer that is GUARANTEED TO MAKE YOU MILLIONS!!! All you have to do is follow these steps:

1) Send me $5.00
2) Email a bunch of morons with this same letter, changing the address to your own
3) Watch as millions of crisp, US five dollar bills float into your mailbox!!!!

IT COULD NOT BE EASIER!!!", "From: %98%96%38%29%22@%29%04%42%29%92%89%20%28.%22%38%18\nReply-To: %98%96%38%29%22@%29%04%42%29%92%89%20%28.%22%38%18\nReturn-Path: Sneaky@SneakyDave.com");

Of course the real From address will still be the default (I suspect to prevent the above scenerio from happening too often)... but the email client will show your From: address, and I believe bounces will be handled by the Return-Path header.

HTH
<!-- NO_AUTO_LINK -->
------------------
Justin Nelson
FutureQuest Support

SneakyDave
07-01-1999, 08:55 AM
Thanks for the info guys.

Sneaky

SneakyDave
07-03-1999, 01:12 PM
Justin, just curious, and to display my ignorance, what do the codes in your post supposed to represent? I'm currently already using the example you gave, but I'm not using the &quot; %98%96%38%29%22@%29%04%42%29%92%89%20%28.%22%38%18&quot; stuff.

Thanks
Sneaky

SneakyDave
07-03-1999, 01:32 PM
Now, I don't understand this:
If you go to this address:
http://sneakydave.com/tools/pmaf/pmaf.php3
(just click on any &quot;view&quot; button, type in your email address where it says &quot;Supply your email&quot;, and click the button)

You'll get an email &quot;from&quot; mailman@sneakydave.com

Yet, when I use the same code on the same server for a different script, I get the &quot;from&quot; to be &quot;PHP3@futurequest.net&quot;, I don't know what the difference can be.

The code looks like this:
An included function:

[nbsp]function send_mail($to_address, $from_address, $subject, $message) {
[nbsp][nbsp]$To = $to_address;
[nbsp][nbsp]$From = $from_address;
[nbsp][nbsp]$Content .= $message . &quot;\n\n\n-----------\nSneakyDave Enterprises\nwww.sneakydave.com&quot;;
[nbsp][nbsp]mail($To, $subject, $Content, &quot;From: &quot; . $From .
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] &quot;\nReply-To: &quot; . $From);
}


The code I use....

[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $to_email_address = $email;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $from_email_address = &quot;mailman@sneakydave.com&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $subject = &quot;P.M.A.F. Code for your auction&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body = &quot;This is a generated message, if you did not request this\n&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body .= &quot;please delete it. If you have numerous messages\n&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body .= &quot;like this that you did not request, please notify\n&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body .= &quot;pmaf@sneakydave.com\n\n&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body .= &quot;Below is the code to copy and paste into your auction\n&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body .= &quot;description:\n&quot;;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $body .= $code;
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] send_mail($to_email_address, $from_email_address,
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] $subject, $body);


The only real difference in the two scripts is the body is different... I'll look some more, but I don't see any differences whatsoever.

SneakyDave
07-03-1999, 01:56 PM
RAGHGGHGHAHGGHGH!!!!!

I know what I did wrong.... You young PHP brats pay attention!

I had 2 scripts executing the exact same code to mail a message, the FROM in one was from &quot;mailman@sneakydave.com&quot;, the other was generating &quot;PHP3@futurequest.net&quot;

The problem was that the TO email address on the second script had a &quot;\n&quot; on the end of it, which screwed up the headers.

Anyway, anyone can use the code up above if they'd like. Sorry to keep anybody scratching their heads.

Sneaky

Justin
07-03-1999, 04:14 PM
I threw in the % codes to simulate a typical spam message - a lot of times they URL encode all of the addresses etc so a newbie doesn't know how to trace the letter back to it's origionator - sorry if it caused confusion :)

But yes, you have it correct now - you can just use this in place of your mail line:


mail($To, $subject, $Content, &quot;From: $From\nReply-To: $From&quot;);

No need to concantenate - just throw the variables within the quotes (just like in Perl, except that I don't think single quotes work the same as Perl....)

HTH

<edit>
Another tip:

$From = &quot;\&quot;Justin Nelson\&quot; <justin@hostfacts.com>&quot;;

This will show the real name (the name within the escaped quotes) in place of the email address in an email client. Same for the To: and Reply-To: fields :)

One final note: for some reason if you specify the From: address, even if it's an addy at your domain, it will only work on our server - it won't accept the mail coming from another server unless you leave out the extra headers (I discovered this using my local copy).
</edit>

------------------
Justin Nelson
FutureQuest Support<!-- NO_AUTO_LINK -->
[This message has been edited by Justin (edited 07-03-99)]