SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Godaddy E-mail On Behalf of Problem

    I am using GoDaddy. I am sending an e-mail. It sends great and i recieve it but it says:

    lg2007@linhost214.prod.mesa1.secureserver.net on behalf of mmm333@xyz.com

    I want it to just say mmm33@xyz.com. How do i get rid of the "on behalf of"

    here is my code:
    Code PHP:
    function isEmail($email)
    {
    	return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i"
    			,$email));
    }
     
     
    $errmsg  = '<h5>It appears there were a few issues with your input.</h5><p class="correction">Please correct the following:</p><ul class="contacterror">'; // error message
    $sname   = ''; // sender's name
    $email   = ''; // sender's email addres
    $subject = 'LearningGate Inquiry'; // message subject
    $message = ''; // the message itself
     
    if(isset($_POST['send']))
    {
    	$fname   = $_POST['fname'];
    	$lname   = $_POST['lname'];
    	$email   = $_POST['email'];
    	$subject = $_POST['subject'];
    	$message = $_POST['comments'];
    	if(trim($fname) == '')
    	{
    		$errmsg .= '<li>&raquo; &nbsp;First Name is required. Please enter a value.</li>';
    	}
    	if(trim($lname) == '')
    	{
    		$errmsg .= '<li>&raquo; &nbsp;Last Name is required. Please enter a value.</li>';
    	} 	 
    	if(trim($email) == '')
    	{
    		$errmsg .= '<li>&raquo; &nbsp;E-mail address is required.</li>';
    	}
    	if(!isEmail($email) && (trim($email) != '') )
    	{
    		$errmsg .= '<li>&raquo; &nbsp;Please enter a valid E-mail Address</li>';
    	}
    	if(trim($message) == '')
    	{
    		$errmsg .= '<li>&raquo; &nbsp;Please enter a message.</li>';
    	}
     
    	if($errmsg == '<h5>It appears there were a few issues with your input.</h5><p class="correction">Please correct the following:</p><ul class="contacterror">')
    	{
    		if(get_magic_quotes_gpc())
    		{
    			$subject = stripslashes($subject);
    			$message = stripslashes($message);
    		}	
     
    		// the email will be sent here
    		$to      = "mmottau@careeracademy.com";
     
    		// the email subject ( modify it as you wish )
    		$subject = '[Contact] : ' . $subject;
     
    		// the mail message ( add any additional information if you want )
    		$msg     = "From : ". $fname. " ". $lname. "\r\n " . $message;
     
    		mail($to, $subject, $msg, "From: $email\n");
     
    	}
    	else{$errmsg .= '</ul>';
     
    		echo $errmsg;}
    }
     
     
    if(!isset($_POST['send']) || $errmsg != '<h5>It appears there were a few issues with your input.</h5><p class="correction">Please correct the following:</p><ul class="contacterror">')
    {
     
     
    	$errmsg = "";
       	$errmsg .= "<form  method='post' name='msgform' id='msgform' action='/site/contactus/' onsubmit='return validateForm();' > \n";
     
      	$errmsg .= "\t<dl>\n ";
        $errmsg .= "\t\t<dt><label for='fname'>First Name:</label><em>*</em></dt> \n";     
       	$errmsg .= "\t\t<dd><input type='text' name='fname' id='fname' tabindex='1' value='' /></dd>\n";
    	$errmsg .= "\t\t<dt><label for='lname'>Last Name:</label><em>*</em></dt> \n";     
       	$errmsg .= "\t\t<dd><input type='text' name='lname' id='lname' tabindex='2' value='' /></dd>\n";
     
     
        $errmsg .= "\t\t<dt><label for='email'>E-Mail:</label><em>*</em></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='email' id='email'  tabindex='3' /></dd>\n";
     
    	$errmsg .= "\t\t<dt><label for='company'>Company:</label></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='company' id='company'  tabindex='4' /></dd>\n";
     
    	$errmsg .= "\t\t<dt><label for='title'>Title:</label></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='title' id='title'  tabindex='5' /></dd>\n";
     
        $errmsg .= "\t\t<dt>\n";
        $errmsg .= "\t\t<label for='address'>Address:</label>\n";
        $errmsg .= "\t\t</dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='address' id='address'  tabindex='6' /></dd>\n";
     
    	$errmsg .= "\t\t<dt><label for='city'>City:</label></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='city' id='city'  tabindex='7' /></dd>\n";
     
    	$errmsg .= "\t\t<dt><label for='state'>State:</label></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='state' id='state'  tabindex='8' /></dd>\n";
     
    	$errmsg .= "\t\t<dt><label for='zip'>Zip:</label></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='zip' id='zip'  tabindex='9' /></dd>\n";
     
    	$errmsg .= "\t\t<dt><label for='phone'>Phone:</label></dt>\n";
        $errmsg .= "\t\t<dd><input type='text' name='phone' id='phone'  tabindex='10' /></dd>\n";
     
     
     
        $errmsg .= "\t\t<dt><label for='comments'>Comments:</label><em>*</em></dt>";
        $errmsg .= "\t\t<dd><textarea name='comments' cols='25' rows='10' id='comments'  tabindex='11'></textarea></dd>\n";
     
        $errmsg .= "\t\t<dt></dt><dd><input name='send' type='submit' class='bluebox' id='send' value='Send Message' /></dd>\n";
      	$errmsg .= "\t</dl>\n"; 
     
    	$errmsg .= "</form>";
     
    	echo $errmsg;
    	}

  2. #2
    SitePoint Evangelist optl's Avatar
    Join Date
    Oct 2004
    Location
    Washington DC
    Posts
    415
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First I want to say GoDaddy is a terrible host. Anyway, is this script on the domain xyz.com. If so, have you created the email address mmm333@xyz.com. If you haven't try creating it, I have had this problem when the email address didnt exist on my domain.
    For the phrase "Bethesda home architect", my clients
    websites occupy 6 of the first 8 results
    on the 1st page of Google. My Secret SEO Strategy Revealed

  3. #3
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I couldn't agree more. I personally prefer Dreamhost. But, the owners of the company I work for signed up through there so I have no choice.

    The from address would be whatever the user puts in as their e-mail address in my form. It is a contact form for a website.

    xyz is something I used as a generic extension


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
  •