Changing my FROM e-mail when using SendMail PHP

software development

#1

I am new to Dreamhost and have a virtual account.

my from address that people are getting is currently "myusername@pringles.dreamhost.com". when I use the “Mail” function in PHP in my forms. (It doesn’t matter what I set my Mail_From as because I am not on a windows server.)

I would like to customize this to my sites name/email address. I am on a virtual host so I do not have access (that i know of ) to httpd.conf which is what i figure i need to add the “-f” line everyone is talking about to.

The “-f” is the answer i recieved at other forums, on google, and from dreamhost support but none have told me the proper way to use it or where to put it as I am sure it is unique to every host, and unique to virtual and dedicated servers.

Could someone please explain the process to me.
What is the exact line I must add?
Where do I add this “-f” line ?
Do I have to use a special variation of the sendmail PHP function?

Thank you so much. Anyone…and everyone.


#2

Using the mail command
it would be like this
$to=‘emailaddress@website.com’;
$subject=‘subject’;
$header=‘From: emailaddress@website.com’;
$body='Your message’
mail ($to, $subject, $body, $header);

Silk


#3

The DreamHost wiki has a good explanation of how the mail function works.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#4

Wow Jessey,
The wiki is getting more and more detailed.
Silk


#5

[quote]Wow Jessey,
The wiki is getting more and more detailed.[/quote]
It is my hope that the wiki will eventually become the first port of call for people looking for help, rather than this discussion forum.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]