Web Hosting Forum | Lunarpages


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



Login with username, password and session length
February 09, 2012, 07:49:49 PM

Pages: [1]   Go Down
  Print  
Author Topic: How get only user@mydomain headers in sending mail  (Read 536 times)
spirtt0
Newbie
*
Offline Offline

Posts: 1


« on: November 30, 2009, 11:45:43 AM »

Hi, i use shared lunarpages hosting. All mail what sending from sites with PHP scripts have "account_name@jalal.lunarpages.com" lines in mail headers, what is unsecure and not always is wanted.

Is it possible to send mail with "user@mydomain" headers instead for main domain and subdomains ?
« Last Edit: November 30, 2009, 12:53:07 PM by spirtt0 » Logged
wektech
Master Jedi
*****
Offline Offline

Posts: 1031



WWW
« Reply #1 on: November 30, 2009, 12:21:19 PM »

add a fifth parameter to your mail command  that reads
Code:
"-r differentaddress@domain.tld"
this will overide the default return path in the headers. The command would then look like
Code:
mail($mailto, $subject, $messageproper, $headers," -r webmaster@somedomain.com" );
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: