Mailserver rejected our "sendmail_from" setting

Posted on 2005-05-05
Last Modified: 2013-12-13
Dear All,

We are having window2000 server and iis 5.0  in it. We have smtp enabled in our IIS with relay authentication. We have PHP version 4.2.3 running in our IIS. We are trying to send mails from our application and it returns the following error.

Warning: Mailserver rejected our "sendmail_from" setting

We are having the following setting in php.ini file, where the sendmail_from is having a valid email address. We tried by disabling the relay authentication, still it is showing the same error.

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

; For Win32 only.
sendmail_from = ; for Win32 only

The code in the php file is,
$ae=mysql_query("select admin_email from dev_config");
$sub = "Login For $sitename";
$content = "Dear $u,

Your requested login information is below.

Username: $u
Password: $p


mail($e,$sub,$content,"From: $ae");
Question by:Bala_261175
    LVL 10

    Accepted Solution


    This situation is bit interesting...
    Did you try by setting:

    sendmail_from ="" //i.e. Empty

    What mail server are you using? If you used relay, then there is a possibility that the original sender mailserver didn't like the sender's email id. So, if your original mailserver is for, then sender should have a id. However, as you have disabled the relay...let us see what happens if you set an empty sender id.

    Will look forward to know more abt this situation.

    LVL 3

    Assisted Solution

    A small point, hopefully just a typo.

    In your code example you put
    >> $ae=$indv_data[admin_email];

    This will try to perform a function called admin_email, is this correct?

    use $ae=$indv_data['admin_email'];


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    PhpMyAdmin, mysql database table editing 4 33
    Write an app 9 35
    Gravity Forms  submission tracking. 3 22
    Php Sql Query 7 19
    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to count occurrences of each item in an array.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now