+ Reply to Thread
Results 1 to 6 of 6

Thread: Form mail "from address"

  1. #1
    Join Date
    Oct 2008
    Posts
    4

    Default Form mail "from address"

    Hi-

    I am hosting a website on my domain. I have a contact page with a php form mail script. After testing the emails sent by the script, the from address displays my mail server address example: mydomain@box18.bluehost.com. I have email accounts setup for the hosted (sub)domain in my domain. Is there a way to have the received emails have the "from" address reflect: something@hostedDomain.com or even hostedDomain@box18.bluehost.com

    Thanks
    Last edited by castpro; 10-22-2008 at 05:46 PM.

  2. #2
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,533

    Default

    To be able to send emails that come from something@hostedDomain.com you simply need to make sure that the email address something@hostedDomain.com actually exists either as a real account or as a forwarder to a real email account.

  3. #3
    Join Date
    Oct 2008
    Posts
    4

    Default

    Thanks for the reply.
    Since the mail is being sent through a form on the contact page from the website, I'm not sure how to specify a sent from address. Do I need to specify a from address in the php script? If so I do not know how.

    Thanks

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,533

    Default

    The from address goes in the email headers - 4th parameter of the call to mail() - along with any other headers you want the email to have.

  5. #5
    Join Date
    Oct 2008
    Posts
    4

    Default

    Thanks...

  6. #6
    Join Date
    Oct 2008
    Posts
    4

    Default

    Yep, that's what I needed to know. It works now.

    Thanks again!

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts