XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum -> 550 Relay denied when tring to send email with PHP

Reply to this topicStart new topicStart Poll

> 550 Relay denied when tring to send email with PHP, unable to use Xmail for php on windowsXP
magosla2001
Posted: Jul 30 2006, 02:29 PM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 2189
Joined: 30-July 06



I use a Apache server installed on a Windows XP platform and PHP5. I recently installed xmail-1.22.win32bin to serve as an SMTP server to send emails using a PHP mailing script. When ever I try sending email from my computer, I receive the below error message in my browser;

Warning: mail() [function.mail]: SMTP server response: 550 Relay denied in E:\Softwares\xampplite\htdocs\mail\ourown\sendem.php on line 78

where E:\Softwares\xampplite\htdocs\mail\ourown\sendem.php is the link to my php mailing script. and E: is the drive where I have my operating system and my apache server installed and xmail at E:\MailRoot

I configured Xmail with instructions from the readme file for NT/Win2K and did it all to number 16. I did'nt do any other configuration because i am not using xmail to retrive email or for email account I only needed it as a mail server to sedn email with my php script form my computer.
My request if for assitance so as to enable me resolve the issue and send email from my web server installed in my pc with ease.


Note: my php mailing script has worked perfectly on diffrent web servers.
PMEmail Poster
Top
hschneider
Posted: Jul 31 2006, 06:47 AM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Add this to smtprelay.tab:
"127.0.0.0" "255.255.255.0"


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
magosla2001
Posted: Aug 4 2006, 01:38 PM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 2189
Joined: 30-July 06



I use Windows XP service pack 2, with apache server and PHP5, i use xmail-1.22.win32bin I have installed the Xmail que manger. when i try sending email the messages never delivers. It is always error sending in the que manager subject: Error sending message [1154692636156.6116.1.today]from[xmailserver.test] from root@xmailserver.text. Also, my messages are always frozen and never delivers. When I use the spool file inspector this is what i find

Spoolfile: [127.0.0.1]:1177;[127.0.0.1]:25;Fri, 4 Aug 2006 12:57:15 +0100
xmailserver.test
S149
MAIL FROM:< Jeff Anderon<jeff@wander.co.uk>>
RCPT TO:<magosla2001@yahoo.co.uk>
<<MAIL-DATA>>
Received: from today ([127.0.0.1]:1177)
by xmailserver.test with [XMail 1.22 ESMTP Server]
id <S149> for <magosla2001@yahoo.co.uk> from <jeff@wander.co.uk>>;
Fri, 4 Aug 2006 12:57:15 +0100
Date: Fri, 04 Aug 2006 13:57:15 +0200
Subject:
To: magosla2001@yahoo.co.uk
From: Jeff Anderson<jeff@wander.co.uk>
Reply-To: Jeff Anderson<jeff@wander.co.uk>
MIME-Version: 1.0
Message-Id: <E1FFDPR-0003yI-VN@mx.nknl.co.uk>
X-MSMail-Priority: high
X-Priority: $priority
Content-type: text/html; charset=iso-8859-1


<DIV style="color:navy; font-family:courier new;font-size:12px;"> <p> &nbsp; </p><p>*********************************************************<br>
<b><u>NOTE</b></u>: You are not expected to reply to this email i></p> <DIV>




For the SLOG: [PeekTime] 1154692636 : Fri, 4 Aug 2006 12:57:16 +0100
<<
ErrCode = -81
ErrString = [MAIL FROM:] not permitted by remote SMTP server
ErrInfo = 501 Syntax error in parameters or arguments
SMAIL SMTP-Send MX = "mx1.mail.ukl.yahoo.com." SMTP = "xmailserver.test" From = " Jeff Anderon<jeff@wander.co.uk" To = "magosla2001@yahoo.co.uk" Failed !
SMTP-Error = "501 Syntax error in parameters or arguments"
SMTP-Server = "mx1.mail.ukl.yahoo.com."
>>




For the Diagnosis:
SYNTAX_FROM

Possible reasons:
- The sending address is malformed.
- The sending address is unbalanced. This means a missing opening or closing > or ).
- The sending address is blocked by the recipient's SMTP
- The sender's domain cannot be resolved by the recipient's DNS


Furthermore, If I put a recipient addresses in the TO: or CC: field this is the response i get:
Warning: mail() [function.mail]: SMTP server response: 501 Syntax error in forward path in E:\Softwares\xampplite\htdocs\mail\ourown\sendem.php on line 78 this dosent happen with Bcc:
I do not know how to resolve the issue so i decided to seek help from this forum
PMEmail Poster
Top
hschneider
Posted: Aug 4 2006, 03:00 PM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



The address is malformed for the yahoo server. It accepts only the email address in the MAIL FROM, but not the user's name:

QUOTE

Trying 195.50.106.7...
Connected to mx1.mail.ukl.yahoo.com.
Escape character is '^]'.
220 mta123.mail.ukl.yahoo.com ESMTP YSmtp service ready
helo test
250 mta123.mail.ukl.yahoo.com
MAIL FROM:< Jeff Anderon<jeff@wander.co.uk>>
501 Syntax error in parameters or arguments
MAIL FROM: <jeff@wander.co.uk>
250 sender <jeff@wander.co.uk> ok


So this is not a XMail problem, your script needs to be adapted to this ...


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
magosla2001
Posted: Aug 4 2006, 04:59 PM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 2189
Joined: 30-July 06



I do not understand your response how I can fix the problem
QUOTE
Trying 195.50.106.7...
Connected to mx1.mail.ukl.yahoo.com.
Escape character is '^]'.
220 mta123.mail.ukl.yahoo.com ESMTP YSmtp service ready
helo test
250 mta123.mail.ukl.yahoo.com
MAIL FROM:< Jeff Anderon<jeff@wander.co.uk>>
501 Syntax error in parameters or arguments
MAIL FROM: <jeff@wander.co.uk>
250 sender <jeff@wander.co.uk> ok
so I decided to post my script that sends the email and this script has work well on servers over the internet.

CODE
$emailform = $_POST['emailForm'];
$from = $_SESSION["email"];
$name = $_SESSION["name"];
$rpemail = $_SESSION["rpemail"];
$rpname = $_SESSION["rpname"];
$to = $_POST['to'];
$cc = $_POST['cc'];
$bcc = $_POST['bcc'];
$subject = $_POST['subject'];
$body = <<<ABC
{$_POST['body']}
<DIV style="color:navy; font-family:courier new;font-size:12px;"> <p> &nbsp; </p><p>*********************************************************<br>
<b><u>NOTE</b></u>: You are not expected to reply to this email {$from}. Your replies or email should be sent to <b> {$_SESSION["rpname"]} <i> {$_SESSION["rpemail"]} </b></i></p> <DIV>
ABC;
$priority = $_POST['priority'];
$headers  = 'MIME-Version: 1.0' . "\r\n" .
           'Message-Id: <E1FFDPR-0003yI-VN@mx.uknl.co.uk>' . "\r\n" .
           'X-MSMail-Priority: high' . "\r\n" .
    'X-Priority: $priority' . "\r\n" .
           'Content-type: text/html; charset=iso-8859-1';
if (mail($to, $subject, $body, "From: $name<$from>\nReply-To: $rpname <$rpemail>\nBcc: $bcc\n$headers")) {
echo "Your Message Has been sent";
}
else {
echo "Error Sending message";
}



I do not know where the problenm comes from in my script
PMEmail Poster
Top
hschneider
Posted: Aug 5 2006, 09:02 AM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Change this
CODE

if (mail($to, $subject, $body, "From: $name<$from>\nReply-To: $rpname <$rpemail>\nBcc: $bcc\n$headers")) {


to that:
CODE

if (mail($to, $subject, $body, "From: $name<$from>\nReply-To: $rpname <$rpemail>\nBcc: $bcc\n$headers","-f$from")) {


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Scripting Corner | Next Newest »

Reply to this topicStart new topicStart Poll