vdennis
Member
We are in the process of adding a new exchange server and when running test on the unix side I am now getting the 501.5.5.4 invalid domain name error. When I run the exact same code on my local, windows box it works fine. I doubled check the 'connection with the following code:
def var hSocket as handle.
def var mailhub as char initial 'xxx.xxxx-xxxxx.com'.
def var iPortNum as integer initial 25.
CREATE SOCKET hSocket.
hSocket:CONNECT("-H " + entry(1,MailHub,":") +
" -S " + string(iPortNum)) NO-ERROR.
IF hSocket:CONNECTED() = FALSE THEN DO:
message
"No Connection"
view-as alert-box.
RETURN.
END.
else do:
message
"Made the connection"
view-as alert-box.
end.
So I know I can make the connection, both in windows and UNIX.
And the test program, when run on a windows box works fine. Sample Code:
{vars-smtp.i}
/** Added for testing in Char **/
def var v-body as longchar .
def var c-ReadLine as char no-undo.
def stream s-vbody .
message
"Mail Hub Is " mailhub
view-as alert-box.
ASSIGN
EmailTo = "Dennis.Voegler@Adams-Burch.com"
EmailFrom = "Dennis.Voegler@Adams-Burch.com"
EmailCC = ""
Attachments = ""
LocalFiles = ""
Subject = "Test to send Email as HTML"
BodyType = "".
/**/
RUN "smtpmail.p"
(INPUT mailhub,
EmailTo,
EmailFrom,
EmailCC,
Attachments,
Localfiles,
Subject,
Body,
MIMEHeader,
BodyType,
Importance,
L_DoAUTH,
C_AuthType,
C_User,
C_Password,
OUTPUT oSuccessful,
OUTPUT vMessage).
/**/
message
oSuccessful skip
vMessage
view-as alert-box.
/**/
stop.
But when run on the UNIX box, we get the error.
Any thoughts on this?
-Dennis-
def var hSocket as handle.
def var mailhub as char initial 'xxx.xxxx-xxxxx.com'.
def var iPortNum as integer initial 25.
CREATE SOCKET hSocket.
hSocket:CONNECT("-H " + entry(1,MailHub,":") +
" -S " + string(iPortNum)) NO-ERROR.
IF hSocket:CONNECTED() = FALSE THEN DO:
message
"No Connection"
view-as alert-box.
RETURN.
END.
else do:
message
"Made the connection"
view-as alert-box.
end.
So I know I can make the connection, both in windows and UNIX.
And the test program, when run on a windows box works fine. Sample Code:
{vars-smtp.i}
/** Added for testing in Char **/
def var v-body as longchar .
def var c-ReadLine as char no-undo.
def stream s-vbody .
message
"Mail Hub Is " mailhub
view-as alert-box.
ASSIGN
EmailTo = "Dennis.Voegler@Adams-Burch.com"
EmailFrom = "Dennis.Voegler@Adams-Burch.com"
EmailCC = ""
Attachments = ""
LocalFiles = ""
Subject = "Test to send Email as HTML"
BodyType = "".
/**/
RUN "smtpmail.p"
(INPUT mailhub,
EmailTo,
EmailFrom,
EmailCC,
Attachments,
Localfiles,
Subject,
Body,
MIMEHeader,
BodyType,
Importance,
L_DoAUTH,
C_AuthType,
C_User,
C_Password,
OUTPUT oSuccessful,
OUTPUT vMessage).
/**/
message
oSuccessful skip
vMessage
view-as alert-box.
/**/
stop.
But when run on the UNIX box, we get the error.
Any thoughts on this?
-Dennis-