Page 1 of 1

Email Mystery

Posted: Thu Jun 24, 2004 9:45 am
by |maxx|
:?
Im having trouble sending emails to addresses outside my domain...
Whenever I use mail(); it will send emails to any account @ourdomain.com just fine, but any outside addresses get rejected.

My email server is win32 and the php.ini settings are as follows:
____________________________________________________
[mail function]
; For Win32 only.
SMTP = 183.xxx.0.2; for Win32 only
sendmail_from= Maxx@ourdomain.com; for Win32 only

; For Win32 only.
sendmail_from = Maxx@ourdomain.com

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


Im pretty sure the problem is in this (part of returned email)

__________________________________
Illegal-Object: S
Return-path: <>
^-expected word
__________________________________

...but I dont know what i can do to fix this... please help!

thank you!

Posted: Thu Jun 24, 2004 10:59 am
by launchcode
The problem is in your PHP code, not your INI file - post the part of it that sends the email.

Posted: Thu Jun 24, 2004 12:27 pm
by |maxx|

Code: Select all

<?php
function send_mail($myname, $myemail, $contactname, $contactemail, $subject, $message) &#123;
  $headers="";
  $headers .= "MIME-Version: 1.0\n";
  $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
  $headers .= "X-Priority: 1\n";
  $headers .= "X-MSMail-Priority: High\n";
  $headers .= "X-Mailer: php\n";
  $headers .= "From: "".$myname."" <".$myemail.">\n";
  return(mail(""".$contactname."" <".$contactemail.">", $subject, $message, $headers));
&#125;


if (send_mail("Company", "maxx@ourdomain.com", "Customer", "maxx@vwsmail.com", "This is a test", "This is a test\nOne two three four\nBlah blah blah\nThis is a test!")) &#123;
  print "SENT!<br>";
&#125; else &#123;
  print "FAILED!<br>";
&#125; 
?>

Posted: Fri Jun 25, 2004 9:43 am
by |maxx|
I dont really think its the code, this problem seems very specific.... and I got the code from php.net so i doubt thats the problem

[SOLVED]

Posted: Fri Jun 25, 2004 10:23 am
by |maxx|
Ok.. we resolved the problem by routing the email outside of our firewall and groupwise.... so if anyone is having this problem (which no one else apparently is) this is how you fix it.... or go around it at least...