• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1125
  • Last Modified:

Mailserver rejected our "sendmail_from" setting

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 = magesh_bala@hotmail.com ; for Win32 only

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

Your requested login information is below.

Username: $u
Password: $p

Sincerely,
$sitename
$base_url";

mail($e,$sub,$content,"From: $ae");
?>
0
Bala_261175
Asked:
Bala_261175
2 Solutions
 
iamanindianCommented:
Hi,

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 www.yourdomain.com, then sender should have a sender@yourdomain.com 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.

Regards
WC
0
 
Colin_UKCommented:
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'];

Regards
Colin
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now