🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #577

Re: porting to Microsoft Exchange

#577
From: Robert G. Hoover
Date: Fri, 29 Feb 2008 13:58
86 lines
3547 bytes
Yea, I completely agree with you guys. It seems to me that I'm talking 
the SMTP talk and for some reason (probably specific to the customer's 
security) my talk is coming back void...

The trouble is that the Exchange server (using "standard SMTP protocol") 
is in the UK and configured not to accept outside requests. I have only 
the log that the customer generated for me. :(

Here's my code... sorry for the formatting... does anything jump out to you?

// send email message to target recipient
bool TEmailOutForm::SendEmailMessage(
AnsiString SenderName,	  // name of sender as "NAME <EMAIL>"
AnsiString SenderEmail,	  // source email address
AnsiString RecipientName, // name of recipient as "NAME <EMAIL>"
AnsiString RecipientEmail,// target email address
AnsiString SubjectText,   // email subject line
AnsiString BodyText)	  // email body contents
{
// compile message
AnsiString MessageContents =
"ehlo ["       + ClientSocket->Socket->LocalAddress    + "]\n"
+ "mail from:" + SenderEmail                           +  "\n"
+ "rcpt to:"   + RecipientEmail                        +  "\n"
+ "data\n"
+ "from:"      + SenderName    + " <" + SenderEmail    + ">\n"
+ "to:"        + RecipientName + " <" + RecipientEmail + ">\n"
+ "subject:"   + SubjectText                           +  "\n";

// append body
MessageContents += BodyText + "\n";

// end message with <CR><LF>.<CR><LF>
MessageContents += String("").sprintf("%c%c.%c%cquit\n", 13, 10, 13, 10);

// send this message to SMTP server
bool SuccessfulTransmit = SendEmailMessageData(MessageContents);
}

If I pair up the communications, I suppose it would look like this...

ehlo [149.155.213.204]

220 NBIE2KSRV1.nbi.bbsrc.ac.uk Microsoft ESMTP MAIL Service, Version: 
6.0.3790.1830 ready at  Tue, 19 Feb 2008 15:58:43 +0000

mail from:myemail@mydomain.com

501 5.5.4 Invalid Address

rcpt to:someone@theirdomain.com

500 5.3.3 Unrecognized command

data

500 5.3.3 Unrecognized command

from:

500 5.3.3 Unrecognized command

to:

500 5.3.3 Unrecognized command

subject:

500 5.3.3 Unrecognized command

0x13 0x10

500 5.3.3 Unrecognized command

0x13

500 5.3.3 Unrecognized command

quit

500 5.3.3 Unrecognized command


Perhaps the sender email address (mine) is not in their whitelist as I 
don't exist in their domain and the server then refuses to recognize 
anything else???
Technical Details
Message-ID: <47c80f8b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!news.germany.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47c59455@newsgroups.borland.com> <n55bs3paa8o0nmdjrf6cee1m3gmdiebb5f@4ax.com> <47c596ee$1@newsgroups.borland.com> <47c5a144$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4f7d962ca9c0a145
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 29 Feb 2008 08:58:10 -0500
From: "Robert G. Hoover" <not.a.real.address@anywhere.sorry>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: porting to Microsoft Exchange
References: <47c59455@newsgroups.borland.com> <n55bs3paa8o0nmdjrf6cee1m3gmdiebb5f@4ax.com> <47c596ee$1@newsgroups.borland.com> <47c5a144$1@newsgroups.borland.com>
In-Reply-To: <47c5a144$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 98.204.13.255
Message-ID: <47c80f8b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1204293515 98.204.13.255 (29 Feb 2008 05:58:35 -0700)
Lines: 86
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!news.germany.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail