Results 1 to 6 of 6

Thread: Changing email name from server

  1. #1
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default Changing email name from server

    How can I remove this from the email server?

    When a user registers on mysite they get an email from:
    treasureshack@linhost275.prod.mesa1.secureserver.net

    How can I change it so it only shows up as:
    TreasureShackOnline
    Last edited by Dirt_Diver; 02-02-2009 at 05:58 AM.
    ___________________________________

    Still working on it!

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Add this somewhere in your mail() function:

    PHP Code:
    $to $_POST['email'];
    $subject "Registration";
    $message "Thanks for registering..."// Bla bla bla

    $header "From: TreasureSchackOnline <no-reply@treasureshack.com>";

    mail ($to$subject$message$header); 
    Hope that helps.

  3. The Following User Says Thank You to Schmoopy For This Useful Post:

    Dirt_Diver (02-02-2009)

  4. #3
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default

    I can't use that, here is my code, this is a register page and it creates the email to the user and makes them click on the page to verify they are who they say they are...

    PHP Code:
    $verifyurl "http://www.treasureshackonline.com/forums/verify.php";
    $verifystring urlencode($randomstring);
    $verifyemail urlencode($_POST['email']);
    $validusername $_POST['username'];



    $mail_body=<<<_MAIL_
    Hi $validusername,
    Please click on the following link to verify your new account:
    $verifyurl?email=$verifyemail&verify=$verifystring
    _MAIL_;

    mail($_POST['email'], $config_forumsname " User verification"$mail_body); 
    ___________________________________

    Still working on it!

  5. #4
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    You can still add the header like so:

    PHP Code:
    $verifyurl "http://www.treasureshackonline.com/forums/verify.php";
    $verifystring urlencode($randomstring);
    $verifyemail urlencode($_POST['email']);
    $validusername $_POST['username'];
    $header "From: TreasureShackOnline <no-reply@treasureshackonline.com>";



    $mail_body=<<<_MAIL_
    Hi $validusername,
    Please click on the following link to verify your new account:
    $verifyurl?email=$verifyemail&verify=$verifystring
    _MAIL_;

    mail($_POST['email'], $config_forumsname " User verification"$mail_body$header); 

  6. The Following User Says Thank You to Schmoopy For This Useful Post:

    Dirt_Diver (02-02-2009)

  7. #5
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default

    Yep that did it, I wasn't sure if I could do it like that or not..

    Thanks
    ___________________________________

    Still working on it!

  8. #6
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    No problem, glad to be of service

    Oh - and just in case you didn't know, your forum isn't working. I'm sure you're aware of this but I assume it's because your doing some testing or what not.

    Anyway, good luck with it.

Bookmarks

Posting Permissions

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