sendemail_from


sendemail_from is in php.ini

what is sendmail_from email address something like sendmail_from = admin@subdomain.website.com

how can i set this up in windows server 2008 iis7
where the email I send from the server is my domain name
LVL 1
rgb192Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

contactrobolCommented:
Locate your php.ini
either it will be in your  php folder or windows folder

Inside the php.ini go to mail section and enter your mail server details.


[mail function]
; For Win32 only.
;SMTP =

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\wamp\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_paramaters =

.. and save the changes.


Do an IIS reset
0
rgb192Author Commented:
in php mail()
there is a line

mailed-by subdomain.website.com

and I think this is set up in windows server 2008 iis

how do I find
the
mailed-by address


0
Ray PaseurCommented:
If you are using the PHP mail() function, you can set the "from" address as part of the headers in the script, thus your mail can come from any address you choose, and it can be sensitive to the context of the script and the client information.  See Example #2 on this page:
http://us2.php.net/manual/en/function.mail.php
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

contactrobolCommented:
<?php
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";  < This is the field which you need to modify in your php code
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
0
rgb192Author Commented:
in php mail()
my server name appears as
'mailed by'  (not from)

is there any way to set or change this

is 'mailed by' sendemail_from in php.ini

0
Ray PaseurCommented:
Please post one of the email messages illustrating this, and including all the headers.  Also, please post the code that generated the email message, so I can re-run it on my server.  I am sure we can show you how to get what you want if we can see all the details.
0
rgb192Author Commented:
Delivered-To: recipient@recipient.com
Received: by 10.42.176.137 with SMTP id be9cs72989icb;
        Fri, 8 Apr 2011 08:27:43 -0700 (PDT)
Received: by 10.227.61.9 with SMTP id r9mr2359850wbh.208.1302276463405;
        Fri, 08 Apr 2011 08:27:43 -0700 (PDT)
Return-Path: <admin@username.onlinehome-server.info>
Received: from S15364561.home (s15364561.onlinehome-server.info [ipAddress])
        by mx.google.com with ESMTP id c8si5984755wbi.33.2011.04.08.08.27.41;
        Fri, 08 Apr 2011 08:27:42 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of admin@username.onlinehome-server.info designates ipAddress as permitted sender) client-ip=ipAddress;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of admin@username.onlinehome-server.info designates ipAddress as permitted sender) smtp.mail=admin@username.onlinehome-server.info
Received: from s15364561 ([127.0.0.1]) by home with MailEnable ESMTP; Fri, 08 Apr 2011 11:27:14 -0400
Date: Fri, 08 Apr 2011 11:27:14 -0400
Subject: Subject
To: recipient@recipient.com
From: sender <sender@sender.com>
Reply-To: sender <sender@sender.com>
Return-Path: <sender@sender.com>
MIME-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1
Message-ID: <233A690CFA5545CBB2FBC582E24E0B62.MAI@home>


email states mailed by 'admin@username.onlinehome-server.info'
0
rgb192Author Commented:
<?php
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
0
Ray PaseurCommented:
Actually, your email has two Return-Path headers.  Not sure what email reader programs might do with that.  But I could not find any example of Mailed-By headers.

Here is what I get from the script in the code snippet.  All headers are included.  As you can see, my host adds a lot more to my outgoing messages!  But the To, Subject and From headers are intact, just as coded in the script.  HTH, ~Ray

Delivered-To: ray.paseur@gmail.com
Received: by 10.216.255.5 with SMTP id i5cs145846wes;
        Wed, 13 Apr 2011 10:39:16 -0700 (PDT)
Received: by 10.43.59.1 with SMTP id wm1mr11944990icb.73.1302716356047;
        Wed, 13 Apr 2011 10:39:16 -0700 (PDT)
Return-Path: <myaccount@server136.chihost.com>
Received: from server136.chihost.com (server136.chihost.com [69.65.9.210])
        by mx.google.com with ESMTPS id ye20si2282235icb.17.2011.04.13.10.39.15
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 13 Apr 2011 10:39:15 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of myaccount@server136.chihost.com designates 69.65.9.210 as permitted sender) client-ip=69.65.9.210;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of myaccount@server136.chihost.com designates 69.65.9.210 as permitted sender) smtp.mail=myaccount@server136.chihost.com
Received: from myaccount by server136.chihost.com with local (Exim 4.69)
      (envelope-from <myaccount@server136.chihost.com>)
      id 1QA426-0007xw-O3
      for Ray.Paseur@Gmail.com; Wed, 13 Apr 2011 12:39:14 -0500
To: Ray.Paseur@Gmail.com
Subject: Test mail
From:someonelse@example.com
Message-Id: <E1QA426-0007xw-O3@server136.chihost.com>
Date: Wed, 13 Apr 2011 12:39:14 -0500
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server136.chihost.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [32078 32003] / [47 12]
X-AntiAbuse: Sender Address Domain - server136.chihost.com
X-Source: /usr/bin/php
X-Source-Args: /usr/bin/php /home/myaccount/public_html/RAY_temp_rgb192.php
X-Source-Dir: myaccount.com:/public_html

Hello! This is a simple email message.

<?php // RAY_temp_rgb192.php
$to = "Ray.Paseur@Gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From:" . $from. "\r\n\r\n";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";

Open in new window

0
rgb192Author Commented:
I sent email to Ray -- check your spam folder

in gmail after opening email, I click 'show details'

email states 'mailed by'  'admin@username.onlinehome-server.info'

'mailed by' is only visible when I send email from the server

0
rgb192Author Commented:
Unrelated:  I have a constant contact question.  
http://mobile.experts-exchange.com/Q_26954492.html
0
Ray PaseurCommented:
I received this.  I am not seeing the "mailed by" information?
Delivered-To: ray.paseur@gmail.com
Received: by 10.216.255.5 with SMTP id i5cs151810wes;
        Wed, 13 Apr 2011 13:43:15 -0700 (PDT)
Received: by 10.227.55.4 with SMTP id s4mr8326590wbg.228.1302727395051;
        Wed, 13 Apr 2011 13:43:15 -0700 (PDT)
Return-Path: <admin@example.com>
Received: from S15364561.home (s15364561.onlinehome-server.info [87.106.209.45])
        by mx.google.com with ESMTP id f49si1671483wef.29.2011.04.13.13.43.14;
        Wed, 13 Apr 2011 13:43:15 -0700 (PDT)
Received-SPF: neutral (google.com: 87.106.209.45 is neither permitted nor denied by best guess record for domain of admin@example.com) client-ip=87.106.209.45;
Authentication-Results: mx.google.com; spf=neutral (google.com: 87.106.209.45 is neither permitted nor denied by best guess record for domain of admin@example.com) smtp.mail=admin@example.com
Received: from s15364561 ([127.0.0.1]) by home with MailEnable ESMTP; Wed, 13 Apr 2011 16:43:11 +0100
Date: Wed, 13 Apr 2011 16:43:11 +0100
Subject: Test mail
To: Ray.Paseur@Gmail.com
From:someonelse@example.com
Message-ID: <3D94AF66383D4ACE858062FDBA2AA8D0.MAI@home>

Hello! This is a simple email message.

Open in new window

0
rgb192Author Commented:
i think 'mailed by' only is visible if I use another ip address.

is there anyway to change 'received from'

received from:   onlinehome-server.info

0
Ray PaseurCommented:
I do not know a way to change where the message was received from, sorry.  Why do you want to obscure this information, anyway?  Most email recipients would appreciate truth and transparency in their communications.  At least I would.
0
rgb192Author Commented:
i am using shared hosting and it is being called spam, even though i only send to customers


i do the same with dedicated hosting and email works

i can not use php mailer() with the content management system
0
Ray PaseurCommented:
You might ask your customers to "whitelist" your from-address.  In many email reader programs this is as simple as sending a reply message or adding the from-address to the address book.  You might also contact the shared hosting provider and ask if they can change the way they are scent-marking your messages.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgb192Author Commented:

You might also contact the shared hosting provider and ask if they can change the way they are scent-marking your messages.
scent-marking  what is this
0
Ray PaseurCommented:
http://dictionary.reference.com/browse/scent-marking

It is a figure of speech. When you walk a dog, it pees on just about everything, as a matter of expressing its presence.  Other dogs smell the urine and say to themselves, "Wow, Fido was here!"  In the case of your email, your hosting provider is injecting headers into the message.  This is under program control and is in no way required.
0
rgb192Author Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.