Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
October 25, 2014, 07:43:47 PM

Pages: [1]   Go Down
  Print  
Author Topic: default email address  (Read 3150 times)
Ramjet the Rookie
Pong! (the videogame) Master
*****
Offline Offline

Posts: 21


WWW
« on: October 06, 2010, 11:03:35 AM »

I have a mysql database that I use for a fantasy sport league. Some of my web pages have forms that need to be submitted and responded to. I have the form set to send me and email, but when I get the emails back they all say they are from myusername@luna.lunarpages.com. how do I change where it says it it coming from?
Logged
kaliya
Space Explorer
***
Offline Offline

Posts: 9


« Reply #1 on: December 21, 2012, 03:46:18 AM »

Visit your C Panel.
Click the "Edit User" link for the user you like to edit .
On the Edit user page click "change email".
In the pop-up dialog box , enter the new email address and then click the save button .

Logged
Malin Cenusa
Customer Service Representative
Support
Spaceship Navigator
*****
Offline Offline

Posts: 84


The World Is Not Enough


WWW
« Reply #2 on: December 21, 2012, 04:45:14 AM »

You can always edit the PHP script that manages the email delivery and add headers to it. A sample form with the headers for your reference would be like the one below:

Code:
<?php
$to      
'nobody@example.com';
$subject 'the subject';
$message 'hello';
$headers 'From: webmaster@example.com' "\r\n" .
    
'Reply-To: webmaster@example.com' "\r\n" .
    
'X-Mailer: PHP/' phpversion();

mail($to$subject$message$headers);
?>

You basically need to define the "From:" field in order to have the email sent from the email address you wish to use.
Logged

Malin Cenusa

Customer Service Representative 2 - Managed Shared Hosting Team
Lunarpages Internet Solutions

Managed Hosting Now Available
http://www.lpwebhosting.com/managed

Website: http://lunarpages.com
Email: support@lunarpages.com
Phone: 1-714-521-8150
Community - http://www.lunarforums.com
Tutorials - http://www.lunarpages.com/tutorials/
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5895



« Reply #3 on: December 21, 2012, 07:15:12 AM »

@kaliya, again you've answered a different question. The problem is that From and Reply-To are using (by default) a different form of the email address. As @Malin said, you can explicitly give addresses in the mail header for these fields. If you're sending out one-way notifications and don't want replies to them, use Reply-To: NO-RESPONSE@yoursite.com and create that email address as one that discards anything coming in (see "blackhole").
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
akkhan
Newbie
*
Offline Offline

Posts: 2


« Reply #4 on: January 06, 2013, 09:21:08 AM »

Thanks to all for giving valuable information about email.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: