Jump to content

email() function. avoiding 'on behalf'


johny20
 Share

Recommended Posts

I use the email() function in order to send emails to the users of my system. The problem is that when they receive the email, they see something like this: myUserName@the_servername.com [myUsername@the_servername.com] on behalf of Web Master [webmaster@mydomain.com]myUsername is the username I use to log-in on Cpanel! How I can avoid all these and keep only the part after the "on behalf"? the code I have so far:

$message = "mplampla";$headers = 'Bcc:' .$email. "\r\n";$headers .= 'From: Web Master <webmaster@mydomain>'."\r\n";  //I want only thismail('',"Invitation",$message,"$headers");

The $email is specified by me, using a text field.

Link to comment
Share on other sites

It's either your mail server or theirs which adds that text. It's probably theirs. You can test that by sending to multiple email providers and, if they all show the same thing, then it's your server adding it. Actually, it probably is yours, since it includes your cPanel username. One thing to do would be to make sure that the domain you are claiming to send from is pointing to your server, the MX records should point to it and a reverse DNS lookup should also match.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...