Closed Thread Icon

Topic awaiting preservation: PHP mail function on Dreamhost (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=11966" title="Pages that link to Topic awaiting preservation: PHP mail function on Dreamhost (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: PHP mail function on Dreamhost <span class="small">(Page 1 of 1)</span>\

 
butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-26-2001 21:28

Anybody here with an account at Dreamhost that's used PHP's mail function. I'm not quite sure how to set the headers so that the mail gets sent as something besides Unknown Sender.

I know it's a long shot, but thanks for any input.

-Butcher-

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-26-2001 23:12

using the generic mail function you have some options as the last argument you can make this arg ,"From: Whoever" and it should do what you are looking for.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 12-26-2001 23:43

Also, the Reply-To: header is useful if you want to say something like "From: Feedback Form", but still be able to reply to an address that was entered into the form....

-jiblet

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-27-2001 02:03

Thanks guys, but I'm not sure what you mean when you say generic mail function Bitdamaged. Here's the code I'm using

$msg = "This e-mail is from www.mysite.com\n";
$msg .= "Username:\t$username\n";
$msg .= "Password:\t$password\n\n";
$to = "$email";
$subject = "Your Username";
$mailheaders = "From: My Web Site <> \n";
$mailheaders .= "Reply-To: www.mysite.com\n\n";
mail($to, $subject, $msg, $mailheaders);

What am I not understanding?

Thanks
-Butcher-

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-27-2001 02:42

That's the one.

In the from attribute if you put an email that is the one the mail should regsiter as coming from



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 12-27-2001 03:31

Thanks Bitdamaged!

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-27-2001 09:37

Also note that "Reply-To" field accepts only e-mail addresses, and not URL like you wrote...


« BackwardsOnwards »

Show Forum Drop Down Menu